LOSS SERIES filter

mouceu4
Posts: 5
Joined: 30 Jun 2013
Has thanked: 1 time

LOSS SERIES filter

Postby mouceu4 » 07 Jul 2014

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

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: LOSS SERIES filter

Postby Henry MultiСharts » 08 Jul 2014

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?

mouceu4
Posts: 5
Joined: 30 Jun 2013
Has thanked: 1 time

Re: LOSS SERIES filter

Postby mouceu4 » 08 Jul 2014

I'm referring to N consecutive losing trades in backtesting.



Cyril

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: LOSS SERIES filter

Postby Henry MultiСharts » 08 Jul 2014

Have you checked the MaxConsecLosers and the other Strategy Performance members?


Return to “User Contributed Studies”