PAST MOVING AVERAGE DEFINITION
-
Hi to all,
I need to compare the the previous 5th candle close(candle-5) to the moving average that was there 5 periods before but i cannot define that spot, if i shift the MA -5 it will be wrong , if i let it there is no trade as the system tries to compare the canlde -5 with the price of MA now . how is it possible to define the closure of MA 5 periods behind??? -
it would be nice if there was a box in every moving averge like the candle box where you choose which candle you need from the past. is there any great programmer that knows how to do it?

-
How is shifting the ma wrong?
Do you mean you want to compare candle (id5) to MA (id5) ?
-
i would like to compare candle close (0,the last candle) , with the price that MA or bollinger had5 periods ago. when you shift it the price MA had 5 periods ago with the shifting 5 MA is not the same.
i dont know how to define the price any indicator had 5 periods ago. -
when editing the condition block, hit "more settings" and there you can adjust the ID.
But working with shift is literally the same as working with candle id:
MA shifted 2 = MA (id2) -

look at the example, , the green MA20 is shifted -15, while the red is the regular MA20. As you can see the prices are the same. i need to compare the candle id=0 last candle, with the price of the regular MA20(12310). In candles is easy because id takes you to that period, but here how we can get the price of the red MA20 15 periods before???
-
@ggrobot said in PAST MOVING AVERAGE DEFINITION:

look at the example, , the green MA20 is shifted -15
Remove the - (minus) symbol
+15Also, you can use the ID method with indicators too, just like candles.
-

I did but still i dont have the price12310 of the MA20 red 15 periods before
which i want to compare -
Yes you do. At the latest candle you can now see where MA was 15 candles ago.
So, condition: candle (id 0) > ma shift 15 (id 0)
you get the same result with this condition: candle (id0) > ma (id 15) -
so this is applied to any MA or indicator, as long as i put in more settings id 15. In the more settings under MA in the id box the candle is referred. if you see it , it doesnt say MA id but candle id. is this correct??
-
indicators are just calculations based on some candles. you see, everything starts from the price.
so you can think candle id is actually same as indicator id