Hi! Could you help me with the following code?
Basically, I want to enter a position after a consecutive loss series.
For instance, we enter a long trade every time the price (using the buy stop order) touches upper price channel. But we enter a long trade only after a 3 consecutive losses.
I didn't manage to find any suitable class/field which can provide me with such possibility. Whenever I try to make a new array of losing trades I meet the following issue: in order to add a new losing trade to an array I have to send a buy/sell order, but under my logic I don't enter a new trade before N losing trades happen...
Is there any way I can make such filter?
Thank you in advance!
P.S. I beg you pardon if such topic already exists but I didn't manage to find it.
~Best
Cyril
LOSS SERIES filter
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: LOSS SERIES filter
Hello Cyril,
By "3 consecutive losses" are you referring to actual three loosing trades executed at broker or three loosing trades in backtesting or something different?
By "3 consecutive losses" are you referring to actual three loosing trades executed at broker or three loosing trades in backtesting or something different?
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: LOSS SERIES filter
Have you checked the MaxConsecLosers and the other Strategy Performance members?