#AvgVolume***Показывает акции со средним объемом больше V за N дней.
#Aggregation — DAY
#by thetrader.pro
def N = 14;
#Число дней для усредненияdef V = 1000000;
#Минимальный торгующийся средний объемplot output = Average(volume, N)>=V;
p_CLASSCODE = «SPBFUT» --Код класса
p_SECCODE = «SiU0» --Код инструмента
function OnInit()
frame_60min = CreateDataSource (p_CLASSCODE, p_SECCODE, INTERVAL_H1)
frame_5min = CreateDataSource (p_CLASSCODE, p_SECCODE, INTERVAL_M5)
Index_60min = nil
Index_5min = nil
LastPrice = nil
IsRun = true
end
function main()
CreateTable()
while IsRun do
if Index_60min ~= frame_60min:Size() then
Index_60min = frame_60min:Size()
end
if Index_5min ~= frame_5min:Size() then
Index_5min = frame_5min:Size()
Transaq = 0
BuyWay = 0
SellWay = 0
end
if LastPrice ~= frame_60min:C(Index_60min) then
LastPrice = frame_60min:C(Index_60min)
BuySignal(frame_60min, Index_60min)
SellSignal(frame_60min, Index_60min)
if BuySpeed ~= nil and SellSpeed ~= nil then
if LastPrice < BuyPrice and BuySpeed > SellSpeed then
SetCell(t_id, 1, 4, «Buy»)
elseif LastPrice > SellPrice and SellSpeed > BuySpeed then
SetCell(t_id, 1, 4, «Sell»)
else
SetCell(t_id, 1, 4, «None»)
end
end
end
sleep(10)
end
📈 Индикатор хорош, как дополнительный инструмент для торговли внутри дня. Показывает взвешенную среднюю цену объема. Чем меньше касаний за день с VWAP, тем лучше и точнее будут отображаться данные. Индикатор хорошо работает в отчетных и новостных акциях.
⚙ График возможно выстраивать по недельным, суточным, часовым данным. Отчет точек, на основе которых строится кривая, осуществляется от начала до конца определенного выбранного периода.
#Thinkscript indicator: VWAP with period
#by thetrader.pro
input cumulativePeriod = 14;
def typicalPrice = (high + low + close) / 3;
def typicalPriceVolume = typicalPrice * volume;
def cumulativeTypicalPriceVolume = sum(typicalPriceVolume, cumulativePeriod);
def cumulativeVolume = sum(volume, cumulativePeriod);
def vwapValue = cumulativeTypicalPriceVolume / cumulativeVolume;
plot warp = vwapValue;