Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 146
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
Want to hear the answer, someone who understands this. Let's say the amount of work. The severity of the work. etcetera. What it's all about.
Want to hear the answer, someone who understands this. Let's say the amount of work. The severity of the work. etcetera. What it's all about.
Here's the article https://www.mql5.com/ru/articles/1467 ...
Do you havea Trend line?
And visually goes over(under) 0 bar, no, check the box in properties, beam.
The line is a trend line. Changed properties to a ray. It did not help. Ideally, I want the price to be displayed regardless of the position of the zero bar (top, bottom).
This code doesn't work either.
int start() {
double pr=ObjectGetValueByShift("line",0);
If (Bid==pr){
Alert (pr);}
return(0);}
Good afternoon everyone!
Question, on insta when trying to send an order, it says that the stops are wrong.
Here is the line itself:
OrderSend(Symbol(),OP_BUYSTOP,Lots,HiP,3,0,0,NULL,111,0,clrBlue);
Stop Loss and Take Points have 0. If I set a number in Stop Loss, everything is normal.
I don't need Stop Loss. What should I do?
The line is trending. Changed the properties to a ray. It did not help. Ideally the price should be displayed regardless of the position of the zero bar (top, bottom).
This code doesn't work either.
int start() {
double pr=ObjectGetValueByShift("line",0);
If (Bid==pr){
Alert (pr);}
return(0);}
Did you type the line name correctly?
Try this script, and show what it says in the logs.
We have a task. Data from the indicators on the higher timeframes is called into the iCustom Expert Advisor. Let's call their support and resistance lines.
Suppose the three figures x1 x2 x3. Please help me to write code that draws lines with these three figures directly in EA.
I tried ObjCreate (I want them to be drawn on a chart as points on every tick, but nothing worked)
To clarify, 3 separate lines. I would not link to mql4 primer. Just share the working code
In this thread I want to begin to help those who really want to understand and learn programming in the new MQL4 and want to easily switch to MQL5 - the languages are very similar.
This will be a good place to discuss tasks, algorithms of their solution and any other questions concerning MT programming.
I hope that other experienced participants of our forum will join the discussion of this issue and the branch will be interesting for everybody.
Here is the task. To the iCustom Expert Advisor, we will call the data of the indicators that stand on the higher timeframes. Let's call their support and resistance lines.
Suppose the three figures x1 x2 x3. Please help me to write code that draws lines with these three figures directly in EA.
I tried ObjCreate (I want them to be drawn on a chart as points onevery tick, but nothing worked)
To clarify, 3 separate lines. Please do not refer to mql4 tutorial. Just share the working code
We have a task. Data from the indicators on the higher timeframes is called into the iCustom Expert Advisor. Let's call their support and resistance lines.
Suppose the three figures x1 x2 x3. Please help me to write code that draws lines with these three figures directly in EA.
I tried ObjCreate (I want them to be drawn on a chart as points onevery tick, but nothing worked)
To clarify, 3 separate lines. Please do not refer to mql4 tutorial. Just share the code that works.
The function
Place it outside void OnTick() function
And this is inside void OnTick()
Please help - I can't understand why I get zero when calculating the VesMass array in i>0 values ?
This is not the problem of Stop Loss but of the open price of the pending order. If the price of the pending order is incorrect, the error is 130.
I've tried to place the pending order within double spread of the price. Only then the error disappears. I don't understand if this is correct?
For example, BUYSTOP order is set at 60 points of Bida. TakeProfit also does not allow to be set less by the value of spread.
I do not understand why it is so. It does not work on the real account but works in the demo mode.