1) a loser
2) and a long trade
im using this code :
if (Performance.AllTrades[0].ProfitCurrency<0 && Performance.AllTrades[0].Entry.MarketPosition==MarketPosition.Long)
Ran into problems so I tested each condition separately
Performance.AllTrades[0].ProfitCurrency<0 -- This seems to work
Performance.AllTrades[0].Entry.MarketPosition==MarketPosition.Long -- this seems to be never true even though my strategy does take long trades in the backtest. I dont know why it does not work.
Is this the right way or should this be done another way ? how do I check for my original condition ?
Thanks in advance
Comment