The price between ticks is not equal to 1 point, this equality is rare. if from below the price then catch the price is greater or equal. If without controlling where the price came from. it's more complicated. like was less, became more or equal and symmetrical. There are two checks. Either check the line level range plus 5 pips and minus 5 pips.
Is it possible for the library to output information to a file (simulate the Print() function) to check what values are inside the library function, tried the usual way of outputting to a file using C++ means did not help, I gave examples earlier, who can give advice?
the price between ticks is not equal to 1 point, this equality is rare. if from below the price then catch the price is greater or equal. If without controlling where the price came from. It's more complicated. Like it was less, became more or equal and symmetrical. There are two checks. Either check the line level range plus 5 pips and minus 5 pips.
But when setting the lines manually without the indicator, the deals are opened, even if not always. The advisor does not see the indicator lines.
Seric29: Is it possible from library side to output information to file (simulate Print() function) to check what values are inside library function, tried usual way of output to file by C++ means did not help, I gave examples earlier, who can advise what?
std::fstream, CreateFile. What do you like best, both work.
I wrote a robot in mql4. I want to rewrite this robot in some close mql language to be able to work on the exchange, such as binance, bimex which have a different trading terminal.
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.
It won't go away.
read
Modified
if(Bid == PriceLine)to
Transactions still do not open at the intersection
Modified
to
The trades still do not open on the crossover
The price between ticks is not equal to 1 point, this equality is rare. if from below the price then catch the price is greater or equal. If without controlling where the price came from. it's more complicated. like was less, became more or equal and symmetrical. There are two checks. Either check the line level range plus 5 pips and minus 5 pips.
the price between ticks is not equal to 1 point, this equality is rare. if from below the price then catch the price is greater or equal. If without controlling where the price came from. It's more complicated. Like it was less, became more or equal and symmetrical. There are two checks. Either check the line level range plus 5 pips and minus 5 pips.
Is it possible from library side to output information to file (simulate Print() function) to check what values are inside library function, tried usual way of output to file by C++ means did not help, I gave examples earlier, who can advise what?
std::fstream, CreateFile. What do I like better, both work.
Did you check your own advice?
Please try this and no file is created or written I tried manually and it doesn't work either
The function connects and returns 12 but does not do any file work.Can anyone help where I have the error?
/////////////////////////////////////////////////
// Close the order but only if it is in profit //
/////////////////////////////////////////////////
void CloseIfInProfit(string symb , int index)
{
for (int i = 0;i <= OrdersTotal();i++)
{
if( OrderSelect(i,SELECT_BY_POS,MODE_TRADES) )
{
if( OrderSymbol() == symb )
{
double profit = ( OrderProfit() - OrderCommission () - OrderSwap() );
if( ( ( OrderType() == OP_BUY || OrderType() == OP_SELL) && ( profit >= 0 ) && (OrderMagicNumber() == MAGIC) )
{
OrderClose(OrderTicket(),OrderLots(),MarketInfo(symb,MODE_BID),100,Red); // Close any open orders
ObjectSetText("Text2"+symb,"",TextSize, "Arial"); // Gets rid of entry criteria message.
}
if (OrderType() == OP_BUYSTOP || OrderType() == OP_SELLSTOP)
{
OrderDelete(OrderTicket()); // Delete any pending orders
ObjectSetText("Text2"+symb,"",TextSize, "Arial"); // Gets rid of entry criteria message.
}
}
}
}
partial[index] = false;
}
Hello all!
Please help me solve a problem.
I wrote a robot in mql4. I want to rewrite this robot in some close mql language to be able to work on the exchange, such as binance, bimex which have a different trading terminal.
Did you check your own advice?
Please try this and no file is created or written I tried manually and it doesn't work either
The function connects and returns 12 but does not work with the files.But when setting lines manually without an indicator, deals open, even if not always. The Expert Advisor does not see the indicator lines.
Try looking at the logbook to see what it prints. This is the modulus of the rounded to integer difference divided by the point.