Please coding of EA i have done keeps opening same position as the one closed before it instead of waiting for the next opposite signal.
i want order history control that will select the last closed order that has same ordertype andsymbol with that of which is to be processed by the EA for making trading desision
while AccountBalance()>0
{
if (IsTradeAllowed())
{
for (int i=0;i<OrdersHistoryTotal; i++)
{ OrderSelect(i,SELECT_BY_POS,MODE_HISTORY);
if (OrderType==OP_SELL && OrderSymbol()==Symbol())
{
OrderSend(------OP_BUY------------)
Please House Is this code capable of stopping same type and same symbol order from following each other. Because in my code, when one order open and close after reaching TakeProfitLevel it will open another same type order in the same direction even if market is about to go otherwise.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Please coding of EA i have done keeps opening same position as the one closed before it instead of waiting for the next opposite signal.
i want order history control that will select the last closed order that has same ordertype andsymbol with that of which is to be processed by the EA for making trading desision
while AccountBalance()>0
{
if (IsTradeAllowed())
{
for (int i=0;i<OrdersHistoryTotal; i++)
{ OrderSelect(i,SELECT_BY_POS,MODE_HISTORY);
if (OrderType==OP_SELL && OrderSymbol()==Symbol())
{
OrderSend(------OP_BUY------------)
Please House Is this code capable of stopping same type and same symbol order from following each other. Because in my code, when one order open and close after reaching TakeProfitLevel it will open another same type order in the same direction even if market is about to go otherwise.
I need Help Urgently