Check if last trade was a winner/loser

Post Reply
martinboye
Posts: 18
Joined: Sun Dec 04, 2022 2:59 pm

Check if last trade was a winner/loser

Post 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
chrisb
Posts: 16
Joined: Wed Dec 14, 2022 5:09 pm

Re: Check if last trade was a winner/loser

Post 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?
martinboye
Posts: 18
Joined: Sun Dec 04, 2022 2:59 pm

Re: Check if last trade was a winner/loser

Post 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!
chrisb
Posts: 16
Joined: Wed Dec 14, 2022 5:09 pm

Re: Check if last trade was a winner/loser

Post by chrisb »

You're welcome. Hope it helped!
Post Reply