READ-ONLY

The forum is now a read-only archive.

For bug reports & platform questions → [email protected]

Our community lives on Discord and YouTube — come join us!

How to stop a strategy once day profit target is reached?

4 replies

dharm virani

Subscriber, bbp_participant, 6 replies.

Visit profile

2 years ago #284499

How to stop a strategy once day profit target is reached?

0

Tomas Matejka

Administrator, sq-ultimate, 2 replies.

Visit profile

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

Subscriber, bbp_participant, 6 replies.

Visit profile

2 years ago #284599

thanks

0

dharm virani

Subscriber, bbp_participant, 6 replies.

Visit profile

2 years ago #284601

hi sir i try but error  plz give me example

 

0

dharm virani

Subscriber, bbp_participant, 6 replies.

Visit profile

2 years ago #284606

hi sir some problem in create variable

Attachments:
You must be logged in to view attached files.

0

Viewing 4 replies - 1 through 4 (of 4 total)