برای ساخت فیلتر، به دیدهبان آپشن بروید، یا از طریق میزکار باکس دیدهبان اضافه کنید؛ فیلتر را بزنید، نام بگذارید، کد را در ادیتور بنویسید و خروجی را با return برگردانید ، سپس ذخیره کنید.
مرجع: راهنمای فرمولنویسی · آموزش ویدیویی · نمونه ستون
فیلتر باید با return true یا return false (یا return یک شرط منطقی) خروجی بدهد.
نقدشوندگی و دفتر سفارش
سنجش نقدشوندگی
return option.ti.volume > 0
&& option.ti.buy1Price > 0
&& option.ti.sell1Price > 0
&& askBidSpread() <= 25;
return option.ti.volume == 0 && option.ti.sell1Count > 0;
return ua.ti.sell1Price > ua.ti.dailyPriceHigh;
ITM، ATM و نوع قرارداد
وضعیت ITM/OTM
return option.type == 'call' && option.state == 'ITM';
return option.type == 'put'
&& option.state == 'ATM'
&& option.daysUntilMaturity <= 14
&& option.daysUntilMaturity >= 1;
اهرم و ارزش ذاتی
اهرم · ارزش ذاتی
return leverage() >= 2;
return option.state == 'ITM' && leverage() >= 4;
return option.ti.sell1Volume > 0
&& intrinsic() > 0
&& option.ti.sell1Price < intrinsic();
return option.ti.sell1Volume > 0
&& option.ti.lastDayPrice
&& option.ti.sell1Price < option.ti.lastDayPrice;
بلکشولز و IV
بلکشولز · IV و HV
let diff = calcRateChange(calcBS().bs, option.ti.sell1Price, 1);
return diff >= -10 && diff <= 10;
return option.iv > 0.5 && option.daysUntilMaturity > 3;
return ua.ivPercentile != null && ua.ivPercentile <= 30;
let iv = calcBS().iv;
if (!iv) return false;
return probOfProfit(breakeven(), ua.ti.lastPrice, iv, option.daysUntilMaturity) >= 60;
سررسید و سر به سر
سر به سر
return option.daysUntilMaturity >= 7
&& option.daysUntilMaturity <= 30
&& option.ti.volume > 0;
let pct = Math.abs(calcRateChange(ua.ti.lastPrice, breakeven()));
return option.ti.sell1Price > 1
&& pct < 2
&& option.daysUntilMaturity < 30;
موقعیت باز و زنجیره
OI · سقف موقعیت باز
return option.openInterest > 500 && option.openInterestPC > 5;
return !option.chainOpen;
return !option.chainOpen || option.chainFill >= 95;
فشار حقیقی و همجهتی با پایه
return option.ti.volume > 0
&& option.ti.realBuyVolume > option.ti.realSellVolume * 1.5
&& option.ti.buy1Count > 0;
return option.ti.lastPC > 0
&& ua.ti.lastPC > 0
&& option.ti.tValue > 1000000000;
ETF و صندوق
return ua.isEtf;
Bull Call Spread — سود ماهانه و فاصله استرایک
ستون متناظر: نمونه کدهای ستون
let index = 0;
let minMonthly = var1 != '' ? Number(var1) : 2;
let minStrikeDist = var2 != '' ? Number(var2) : 10;
while (optionSE(++index) != undefined) {
let upper = optionSE(index);
if (!upper || upper.ti.buy1Volume == 0 || option.ti.buy1Volume == 0) continue;
let debit = (option.ti.sell1Price - upper.ti.buy1Price) * option.size;
let profit = ((upper.strike - option.strike) * option.size) - debit;
let yCapital = monthlyProfit((profit / debit) * 100, option.daysUntilMaturity);
let disStrike = calcRateChange(ua.ti.lastPrice, upper.strike);
if (disStrike > minStrikeDist && disStrike > 0 && yCapital > minMonthly
&& option.ti.sell1Price > 0 && upper.ti.buy1Price > 0
&& option.type == 'call') {
return true;
}
}
return false;
فرمولها در کتابخانه شخصی ذخیره میشوند و میتوانید هر کدام را بهعنوان فیلتر یا ستون سفارشی به دیدهبان اضافه کنید.