Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1122
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.