First derivative of SMA
10/12/2017 at 3:50 PM #49154
i’m new to proorder (not to trading hopefully).
came here to code a strategy based on SMA first derivative (i.e. Current SMA versus previous SMA). Seems pretty basic to follow the trend but I don’t see anything on the strategies nor screeners … it’s always relative values of SMA between themselves
did i miss something ? Shall I store the previous value in a WHILE loop ?
thx for ur help,
Greg10/12/2017 at 4:09 PM #49160
To access the value of a variable of the past, it is simply necessary to choose the backward period that one wishes to observe, for example with a moving average SMA 20 periods:1234567//moving average 20 periodssma20 = average//value of SMA20, 1 period beforemyValue = sma20return sma20, myValue
.. and please don’t double post 🙂10/18/2017 at 12:03 PM #49816