the frequency of positions

 

i want to have one position until reverse condition. how can i solve this problem?

 
behnamkarimi187:

i want to have one position until reverse condition. how can i solve this problem?

When conditions exist for a buy - open a buy trade.

If conditions change to a sell, close the buy (if it is still open) and open a sell.

 
behnamkarimi187: i want to have one position until reverse condition. how can i solve this problem?

That's not a problem, that is what you want. Code it.