I want to incorporate Pivot Point stop into my strategy. To achieve this, I would be using ZigZag indicator and 4 variables:
1) Low_Pivot_Current - Current value of Pivot Low, i.e., whenever ZigZag stops going down and turns back up (does "V"), I would update it., I can think or such a calculation: (ZigZag[0]>ZigZag[1] && ZigZag[1]<ZigZag[2]), But I improvised with ZigZag name usage, It may be different and have additional parameters.
2) Low_Pivot_Previous - Previous value of Pivot Low, i.e. whenever Low_Pivot_Current is updated, previous value of Low_Pivot_Current becomes current value of Low_Pivot_Previous.
3) High_Pivot_Current - Current value of Pivot High, i.e., whenever ZigZag stops going up and turns back down (does "/"), I would update it., I can think or such a calculation: (ZigZag[0]<ZigZag[1] && ZigZag[1]>ZigZag[2]), But I improvised with ZigZag name usage, It may be different and have additional parameters.
4) High_Pivot_Previous - Previous value of Pivot High, i.e. whenever High_Pivot_Current is updated, previous value of High_Pivot_Current becomes current value of High_Pivot_Previous.
I use such settings for ZigZag:
Deviation type: Points
Deviation value: 2
Use high low: True
So how can I make 1), 2), 3), 4) variable formulas?
And then my stop formula would be for longs: if (Close[0] <= Low_Pivot_Current, then ExitLong()
For shorts: If (Close[0] >= High_Pivot_Current, then ExitShort()
Comment