thinkorswim

Скрипт рисует хай/лоу и VPOC по заданному числу свечек....


Проголосовало: 0

Ноя 15 2012, 23:25


Комментарий
growex


growex 10.14.2012
input Bars = 1;
input SynthNumber = 300;
def period = barnumber()-1;
rec count = CompoundValue(1, if period != period[1] then (count[1] + period - period[1]) % Bars else count[1], 0);
def cond = count < count[1] + period - period[1];
profile vol = volumeProfile("startNewProfile" = cond, "numberOfProfiles" = SynthNumber, onExpansion = No);
def con = compoundValue(1, no, no);
rec pc = if IsNaN(vol.getPointOfControl()) and con then pc[1] else vol.getPointOfControl();
plot POC = pc;
poc.setPaintingStrategy(paintingStrategy.HORIZONTAL);
rec hblock = if IsNaN(vol.getHighest()) then hblock[1] else vol.getHighest();
rec lblock = if IsNaN(vol.getLowest()) then lblock[1] else vol.getLowest();
plot hb = hblock;
plot lb = lblock;
hb.setPaintingStrategy(paintingStrategy.HORIZONTAL);
lb.setPaintingStrategy(paintingStrategy.HORIZONTAL);

Ноя 15 2012, 23:25
Наш канал