Page 1 of 1

Check if last trade was a winner/loser

Posted: Sun Jan 29, 2023 2:08 pm
by martinboye
Hello,

Can anyone help me create a rule that checks if the previous trade was a winner or a loser?

I am testing a strategy where I am only allowed to place a trade if the previous trade was a loser, and it would be great if I could fully automate the backtest.

Cheers,
Martin

Re: Check if last trade was a winner/loser

Posted: Mon Jan 30, 2023 3:39 pm
by chrisb
Could the Order profit, under Default Rules and Order Information be used to compare to a + or - value to see if it was a win or loss?

Re: Check if last trade was a winner/loser

Posted: Tue Feb 14, 2023 12:04 pm
by martinboye
chrisb wrote: Mon Jan 30, 2023 3:39 pm Could the Order profit, under Default Rules and Order Information be used to compare to a + or - value to see if it was a win or loss?
Hi chrisb,

That's a brilliant idea. So simple that the thought never occurred to me :) Thanks!

Re: Check if last trade was a winner/loser

Posted: Sun Feb 26, 2023 3:38 pm
by chrisb
You're welcome. Hope it helped!