//--
if (signal1>=1)
{
for (i=0; i<MaxTries; i++)
{
RefreshRates();
if(AccountFreeMarginCheck(S1,OP_SELL,Lot1) <= 0)Print(Id+": Not enough money to open Sell Order!");
else {
ticket = Sell(S1,Lot1,MarketInfo(S1,MODE_BID),0,0,magic,"Mirror Trancexe");
if(ticket>0)
Print(TimeToStr(Time[0])+" Sell at "+S1+" "+DoubleToStr(MarketInfo(S1,MODE_BID),Digits)+" Lots="+DoubleToStr(Lot1,2));
break;
}
}
//--
for (i=0; i<MaxTries; i++)
{
RefreshRates();
if(AccountFreeMarginCheck(S2,OP_SELL,Lot2) <= 0)Print(Id+": Not enough money to open Sell Order!");
else {
ticket = Sell(S2,Lot2,MarketInfo(S2,MODE_BID),0,0,magic,"Mirror Trancexe");
if(ticket>0)
Print(TimeToStr(Time[0])+" Sell at "+S2+" "+DoubleToStr(MarketInfo(S2,MODE_BID),Digits)+" Lots="+DoubleToStr(Lot2,2));
break;
}
}
}
//--
if (signal2>=1)
{
for (i=0; i<MaxTries; i++)
{
RefreshRates();
if(AccountFreeMarginCheck(S1,OP_BUY,Lot1) <= 0)Print(Id+": Not enough money to open Buy Order!");
else {
ticket = Buy(S1,Lot1,MarketInfo(S1,MODE_ASK),0,0,magic,"Mirror Trancexe");
if(ticket>0)
Print(TimeToStr(Time[0])+" Buy at "+S1+" "+DoubleToStr(MarketInfo(S1,MODE_ASK),Digits)+" Lots="+DoubleToStr(Lot1,2));
break;
}
}
//--
for (i=0; i<MaxTries; i++)
{
RefreshRates();
if(AccountFreeMarginCheck(S2,OP_BUY,Lot2) <= 0)Print(Id+": Not enough money to open Buy Order!");
else {
ticket = Buy(S2,Lot2,MarketInfo(S2,MODE_ASK),0,0,magic,"Mirror Trancexe");
if(ticket>0)
Print(TimeToStr(Time[0])+" Buy at "+S2+" "+DoubleToStr(MarketInfo(S2,MODE_ASK),Digits)+" Lots="+DoubleToStr(Lot2,2));
break;
}
}
}