can anyone help me out here….
I want to add to my code that the entry should not be on the open of the next bar according to the following code but only after the opening and after the price has retraced x number of points.
How would I do this for a long /and short)?
>IF (c1 AND c2) AND not daysForbiddenEntry THEN
BUY 1 CONTRACT AT MARKET
ENDIF
thankyou!
JSParticipant
Senior
Once OpeningTime = 090000
Once xPoints = 5
Once PositionSize = 1
If Time >= OpeningTime and Not OnMarket then
HighRetracement = High - Close
LowRetracement = Close - Low
If HighRetracement >= xPoints and C1 and C2 then
SellShort PositionSize contracts at Market
ElsIf LowRetracement >= xPoints and C1 and C2 then
Buy PositionSize contracts at Market
EndIf
EndIf
Hi @deltasystem
You can use:
HighRetracement = High – Close
LowRetracement = Close – Low