Code
//+------------------------------------------------------------------+
//| Easiest ea.mq4 |
//| Copyright 2020, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
extern int MagicNumber =22112020;
extern string mn="Easiest";
extern double stop_loss = 146;
extern double take_profit = 899;
extern double LotFactor = 126;
int last_bar = 0;
int start()
{
if (last_bar == Bars) return(0);
last_bar = Bars;
if (OrdersTotal() == 0)
{
int ticket1 = (OrderSend(Symbol(), OP_BUY, (AccountBalance() * 0.01 /LotFactor) ,Ask, 3, Ask - stop_loss * Point, Bid + take_profit * Point,"Easiest", MagicNumber, 0, Blue));
int ticket2= (OrderSend(Symbol(), OP_SELL, (AccountBalance() * 0.01 /LotFactor) ,Bid, 3, Bid + stop_loss * Point, Ask - take_profit * Point, "Easiest", MagicNumber, 0, Red));
}
return(0);
}