How to find the time of the bar by condition, ie what should stand in place of (time1=D'00:00';). The price crosses the line and the arrow should be drawn on the bar that crossed the line.
Alexandr24: You can put Time[0] instead of time1 but it will be in real time mode. And if you want to throw to "history" then how can you find the time of the bar which crossed the line?
Alexandr24: You can put Time[0] instead of time1 but it will be in real time mode. And if you want to throw to "history" then how can you find the time of the bar which crossed the line?
If we know the number of the bar where the crossing occurred, then Time[bar number]
Please contact and make people happy here, and keep your Viennese forest tales and Madrid court secrets to yourself.... (read "puzzles" in the absence of a "concrete and detailed" question).
How to correctly rewrite the OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES );OrderDelete(ticket,Red);Alert ("Error OrderDelete ", GetLastError(); // OrderClose( ticket, Lots, Bid, 5, 0 ); Alert ("OrderClose error", GetLastError()); }
Just read the workbook - it's all there - ... order select in a loop on the orders you are interested in... etc... These are standard 'pieces' of code...
PapaYozh, thank you very much for messing with me! The problem turned out to be this Stop Level. Ask was closer than 200 units before the opening, so it didn't open. Everything is fine now, thanks !
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.
Dear forum users, help with the code
How to find the time of the bar by condition, ie what should stand in place of (time1=D'00:00';). The price crosses the line and the arrow should be drawn on the bar that crossed the line.
OpenFrv Up=79.215 SL=77.855 TP=79.445 STOPLEVEL=200
Revv Up=78.065 SL=76.705 TP=78.295 STOPLEVEL=200
and what is the Ask price ?
Is there 200 pips from it to OpenFrw Up ?
And what is the spread?
You can put Time[0] instead of time1 but it will be in real time mode. And if you want to throw to "history" then how can you find the time of the bar which crossed the line?
You can put Time[0] instead of time1 but it will be in real time mode. And if you want to throw to "history" then how can you find the time of the bar which crossed the line?
Please contact and make people happy here, and keep your Viennese forest tales and Madrid court secrets to yourself.... (read "puzzles" in the absence of a "concrete and detailed" question).
Yeah, got it. if (OrdersTotal( ) !=0 {
How to correctly prescribe the OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES );OrderDelete(ticket,Red);Alert ("OrderDelete error", GetLastError());
// OrderClose( ticket, Lots, Bid, 5, 0 ); Alert ("OrderClose error", GetLastError()); }
Here's a tip.
There's a cool trick in the editor - the F1 hint.
Highlight the function you're quashing and press F1.
Help will open, and you should carefully study what the parameters of the function should be.
Don't miss the quantity and quality of parameters fed into the function.
Yeah, got it. if (OrdersTotal( ) !=0 {
How to correctly rewrite the OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES );OrderDelete(ticket,Red);Alert ("Error OrderDelete ", GetLastError();
// OrderClose( ticket, Lots, Bid, 5, 0 ); Alert ("OrderClose error", GetLastError()); }
Just read the workbook - it's all there - ... order select in a loop on the orders you are interested in... etc... These are standard 'pieces' of code...
What is the Ask price?
Is there 200 pips from it to the OpenFrw Up ?
And what is the spread ?