Attachment bugged_Strategy 482341.sqx added
//+------------------------------------------------------------------+ bool sqMarketPositionIsShort(int magicNo, string symbol, string comment){ return sqSelectPosition(magicNo, symbol, -1, comment, false); } //+------------------------------------------------------------------+ bool sqMarketPositionIsNotShort(int magicNo, string symbol, string comment){ if(sqSelectOrder(magicNo, symbol, -1, comment, false)) { return false; } else return true; } //+------------------------------------------------------------------+ bool sqMarketPositionIsLong(int magicNo, string symbol, string comment){ return sqSelectPosition(magicNo, symbol, 1, comment, false); } //+------------------------------------------------------------------+ bool sqMarketPositionIsNotLong(int magicNo, string symbol, string comment){ if(sqSelectOrder(magicNo, symbol, 1, comment, false)) { return false; } else return true; } //+------------------------------------------------------------------+ bool sqMarketPositionIsFlat(int magicNo, string symbol, string comment){ return sqGetMarketPosition(symbol, magicNo, comment) == 0; } //+------------------------------------------------------------------+