注文タイプの取得
MQL4 : OrderType()
for(int i=OrdersTotal()-1;i>=0;i–)
{
if(!OrderSelect(i,SELECT_BY_POS))continue;
Print(“Type : “,OrderType());
}
MQL5 : PositionGetInteger(POSITION_TYPE)
for(int i=PositionsTotal()-1; i>=0; i–)
{
ulong Ticket=PositionGetTicket(i);
Print(“Type : “,PositionGetInteger(POSITION_TYPE));
}