hi, could you tell me why this code is not opening any positions?
You made a mistake when you copied and pasted the code.
The error is here:
//--- it is important to enter the market correctly, //--- but it is more important to exit it correctly... //--- first check if position exists - try to select it if(m_position.Select(Symbol())) { //--- check for long position (BUY) possibility if(LongOpened()) return(true); //--- check for short position (SELL) possibility if(ShortOpened()) return(true); } return(false);
You have not provided a condition for what to do if there is NO POSITION YET in the market.