Strategy wont open trades

guys i’v been having a hard time with the “Position.MarketPosition != MarketPosition.Flat”
i want my strategy to check if there is no trades in the chart then place a trade , but it seems every time i embed this peace of logic in any strategy i build it will never place trade again till i remove this code

please help

“Position.MarketPosition != MarketPosition.Flat”

this checks if your position is NOT flat. If you want to check if the strategy has no open positions then you need to use

“if (Position.MarketPosition == MarketPosition.Flat) { //do something }”

1 Like

thank you that MF “!” singe did me dirty for 15 days :smiling_face_with_tear: