Hi all,
Anyone know how to call out the low of a candle which formed at the most recent fractal low so I can use it in a system to place a stop loss at that level once my buy conditions have been met?
Many thanks in advance for any input.
The code found in this indicator might help you:
Pivot Support/Resistance Zones
Adapted like this it should return value SupportPrice that can be used as your SL level:
PivotBAR = 2 //2 bars AFTER pivot
LookBack = 2 //2 bars BEFORE pivot
BarLookBack = PivotBAR + 1
IF low[PivotBAR] < lowest[LookBack](low)[BarLookBack] THEN
IF low[PivotBAR] = lowest[BarLookBack](low) THEN
SupportPrice = low[PivotBAR]
ENDIF
ENDIF
Change the PivotBar and LookBack setting depending on how you exactly define a new fractal.
Not tested.