thinkorswim

кто поможет исправить индюк фракал. Нужно сделать так чтобы он удалял последнее значение перед рассчетом нового значения. Т.е. чтобы значение было только последнее. код input fractal_length = 5; def up_cond1 = high == Highest(high, fractal_length); def up_cond2 = high > Highest(high, fractal_length)[fractal_length]; def up_cond3 = if close[-fractal_length] then high > Highest(high, fractal_length)[-fractal_length] else high > Highest(high, fractal_length); def frac_up = up_cond1 && up_cond2 && up_cond3; def down_cond1 = low == Lowest(low, fractal_length); def down_cond2 = low < Lowest(low, fractal_length)[fractal_length]; def down_cond3 = if close[-fractal_length] then low < Lowest(low, fractal_length)[-fractal_length] else low < Lowest(low, fractal_length); def frac_down = down_cond1 && down_cond2 && down_cond3; plot up = if frac_up then high else double.NaN; plot down = if frac_down then low else double.nan; up.SetPaintingStrategy(paintingStrategy.ARROW_down ); down.SetPaintingStrategy(paintingStrategy.ARROW_up );


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

Мар 09 2016, 23:29


Комментарии
keekkenen

то есть чтобы отражалась только одна стрелка либо вверх, либо вниз ?

Мар 10 2016, 23:23
gabaritufa

Не совсем, проще говоря отобразить фрактал в виде линии, чтобы пока не нарисовался новый фрактал значение сохранялось последнее.

Мар 11 2016, 10:12
Наш канал