Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 465
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
Hello. I have recently started studying MQL4 and came across the following misunderstanding.
As you can see in the example below, when the highest candle in the bar reaches 1.3058, the order should close. The order is closed according to the conditions but the close price is not 1.3058(it might be 1-3 pips higher). So, how do we close correctly? Does it closeat 1.3058?
Hello. I have recently started studying MQL4 and came across the following misunderstanding.
As you can see in the example below, when the highest candle in the bar reaches 1.3058, the order should close. The order is closed according to the conditions but the close price is not 1.3058(it might be 1-3 pips higher). So, how do we close correctly? Youwant your order to close at 1.3058?
Well, imagine that on the last tick the price was 1.3057, and on the current tick it is 1.3059.
Don't say later that the order didn't close. You are not doing the check correctly. You have to do it on "more or equal" or "less or equal" and nothing else.
Imagine a situation where on the last tick the price was 1.3057 and on the current tick it became 1.3059.
Do not say that the order is not closed. You check it incorrectly. You should check for "more or equal" or "less or equal".
That's what I do >=. The above is only an example (excuse the tautology) and the issue is not that the order is not closed, but that it is closed not as I would like it to be.
No way, MT provides for slippage-Slippage, which is always in favour of the broker.
You could write a script that draws this line. Bind this script to a hotkey.
Thanks. I'll give it a try.
This is what I do >=. The above example is just an example (excuse the tautology) and the issue is not that the order does not close, but that it does not close the way I would like it to.
I mean there is no way out at all? Sad ((!)Good evening everyone!
Can you tell me what I'm doing wrong?
int start()
{
//----
ObjectCreate("trendln1",OBJ_TREND,0);
ObjectSet("trendln1",OBJPROP_COLOR,Red);
//----
return(0);
}
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!P.s. I tried to write a script for calling the trend line so that it would then be possible to assign a hotkey to appear the trend line.
Good evening everyone!
Can you tell me what I'm doing wrong?
int start()
{
//----
ObjectCreate("trendln1",OBJ_TREND,0);
ObjectSet("trendln1",OBJPROP_COLOR,Red);
//----
return(0);
}
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!P.s. I tried to write a script for calling the trend line so that it would then be possible to assign a hotkey to appear the trend line.
You should at least specify some coordinate when creating an object.
You should at least specify some coordinate when creating an object.
and if I want to specify the coordinate already with the mouse. I just need to call the trend line itself, but it hasn't worked out yet. Is this possible?
and if I want to point the coordinate already with the mouse. I just need to call the trend line itself, but not yet triggered. Is it possible?
It's not the easiest thing to build a trend line, and you do it with the mouse.
Constructing a trendline is not the easiest thing to do, and you're using your mouse to do it.
Sorry, I probably didn't explain: I want to hotkey a simple trendline object (there are such objects: horizontal, vertical and trend line), which I would have already built myself. According to my strategy I need to build a lot of such lines. I have already prescribed a script to delete them myself)))