|
SystemTrade
2012-07-29 18:33:42
0
|
|
Best Answer
Hi Obuli,
sp(3, 0) returns the price level of last swing point, but from that information alone you do not see whether it is a swing high or low.
sp(3, 1) returns the price level of the swing point before, and you will know that this is a swing high if sp(3, 0) was a swing low and vice versa.
sp(3, -1) returns the price level of the LAST swing point with a positive sign if this is a swing high and negative in case of a swing low. It only works for the LAST swing point, because if you know whether the last one is high or low, you automatically know the sign of the swing point before.
If you want to see the sign on every swing point, just modify the last line of the code from "return(TA.Iff(point < 0, sti, TA.Absolute(sti)));" to "return(sti);"
Hope this helps.
|
|