LinkParticipant
Senior
I need code.
I want to buy a long position when the conditions are met and the price rises 0.5%.
I understand that “at limit” is used, but I can’t.
There you go:
IF close <= lowest[100](low[1]) THEN
EntryPrice = close * 1.005 //enter next time after a +0.5% is reached
Flag = 0
ENDIF
IF OnMarket THEN
Flag = 1
ENDIF
MyLongConditions = Not OnMarket AND close CROSSES OVER average[200,0](close)
IF MyLongConditions AND close >= EntryPrice AND Flag = 0 THEN
BUY 1 CONTRACT AT MARKET
Flag = 1
SET STOP pLOSS 500
SET TARGET pPROFIT 1000
ENDIF
graphonprice EntryPrice