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!

Stop trading for x hours if y consecutive losses in z hours

2 replies

alanhere

Subscriber, customer, community, bbp_participant, sq-ultimate, 82 replies.

Visit profile

3 years ago #280542

Hi everyone,

I want to implement something which can stop Stop trading for x hours if y consecutive losses in z hours

I’ve seen on numerous occasions that my algo triggers multiple times in a day with massive price movements (due to news or some unexpected event)..these mostly end in loss so if there’s some code which can temporary halt trading if it sees multiple losses in x hours, this would be really useful.

Is this possible in currently version or is this something which I could request as a new feature?

0

Tomas Matejka

Administrator, sq-ultimate, 2 replies.

Visit profile

3 years ago #280570

Unfortunately it is currently not possible to do. This would require additional functions to be implemented so you can add a new feature request for AlgoWizard using this link https://roadmap.strategyquant.com/projects/algw/tasks/new

0

James Colton

Subscriber, bbp_participant, sq-ultimate, customer, community, 9 replies.

Visit profile

3 years ago #280645

You can do something similar with a code snippet you add to your strategies if your able to track net profit within your strategy. Perhaps it will be harder to back test.

Save Net profit as a variable and check it after each position closes. If it has increased save the new value as HighProfitMark or some other variable. Then set a trade filter to subtract the current net profit value from the HighProfitMark value and reduce position size or disable trading if the drawdown value or percentage exceeds your tolerance.

in TradeStation EasyLanguage it might look something like the following:

If HighProfitMark < NetProfit then HighProfitMark = NetProfit;

If NetProfit > HighProfitMark – 750 then begin

// alternatively you might use If NetProfit > .9* HighProfitMark then begin

/////////////insert position entry code above this line ///////////////////

end;

I use similar code based on Net Account Value as a circuit breaker for my whole account.

0

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