Questions from Beginners MQL5 MT5 MetaTrader 5 - page 308

 

Candlesticks have nothing to do with it. We draw the trend line on the chart. One point connects it to the minimum, the other to the maximum. Suppose the high is 1.31000 and the low is 1. 30000. We easily determine the numeric middle point between the maximum and the minimum. This is the level where the Fibonacci line object is attached.

 
Let it bind to any bar closest to the trend line. The main thing is to be in the middle between the high and low of the trend line.
 
Karatalmazovih:
Let it bind to any bar closest to the trend line. The main thing is to be in the middle between maximum and minimum of the trend line.

Take a look at what you've got. Adjust the colours and styles in the code yourself - I've left explanations there.

First you draw the lines, then you draw the script.

Files:
AutoFibo.mq5  3 kb
 
Thank you so much from the bottom of my heart!!! I'll have a look now. I'll write back later. Thank you!
 
Can you tell me which folder to put it in?
 
Karatalmazovih:
Can you tell me which folder to put it in?
terminal_dir\MQL5\scripts
 
It's not working(((( I have the MQL4 folder maybe that's the problem?
 
Karatalmazovih:
I can't get it to work(((( I have the MQL4 folder, maybe that's the problem?
Yes. The script is for MetaTrader5. It is exactly the script, i.e. you just put it on the chart and get the result. For newly drawn lines you will need to drag them to the chart again. It works only for selected lines.
 
Dear, how do you run this script on the metatrader4? Thank you.
 
Karatalmazovih:
Dear, how do I run this script on metatrader4? Thank you.

Next time be sure to specify what terminal you are using (MT4/MT5).

Files:
AutoFibo.mq4  3 kb
Reason: