How to stop a strategy once day profit target is reached?
4 replies
dharm virani
2 years ago #284499
How to stop a strategy once day profit target is reached?
0
Tomas Matejka
2 years ago #284587
Hi,
you need to setup a variable LastDayAccountEq and a new condition tab and store the AccountEquity end of day
Such as:
If Date[2] <> Date[1]
this catches the midnight moment when bar date switch to a new day. Add this under the new condition as “action”
Then AssignVariable (LastDayAccountEq) = AccountEquity
You can than use this value in a signal condition (Long/Short)
If (LastDayAccountEq – AccountEquity) < 100 …
As long as today’s PnL is less than 100 your signals will get fired
0
dharm virani
2 years ago #284599
thanks
0
dharm virani
2 years ago #284601
hi sir i try but error plz give me example
0
dharm virani
2 years ago #284606
hi sir some problem in create variable
0
Viewing 4 replies - 1 through 4 (of 4 total)