
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
Please help me, how to write Fibonacci lines in an EA from this indicator, by showing on one line for example Thank you very much for your help.
Take this part of the code:
Insert into Expert Advisor. Variables highst and lowest will have levels 0 and 100, calculate the remaining levels.
By time from the variables T1 and T2 we can determine 100 above 0, or 0 above 100.
Add the range multiplied by a factor to the zero level. The range is the distance between level 0 and 100. The coefficients are there below in the code where the fibo levels are set:
0.236, 0.382, 0.50, 0.618...
It would be better to add a couple of variables: Level0 and Level100, assign them a value depending on T1 AND T2:
Or vice versa:
I'll have to experiment))
All we need to do now is to calculate the levels:
Level=Level0+(Level100-Level0)*K;
For each level (for each K).
Add the range multiplied by a factor to the zero level. The range is the distance between level 0 and 100. The coefficients are there below in the code where the fibo levels are set:
0.236, 0.382, 0.50, 0.618...
It would be better to add a couple of variables: Level0 and Level100, assign them a value depending on T1 AND T2:
Or vice versa:
I'll have to experiment))
All we need to do now is to calculate the levels:
Level=Level0+(Level100-Level0)*K;
For each level (for each K).
...
Did I do it right? if(T1<T2){
Level0 = highest;
Level100 = lowest;
}
else{
Level100 = highest;
Level0 = lowest;
}
double K=lowest-highest;
double Level2=Level0+(Level100-Level0)*23.6;
double Level3=Level0+(Level100-Level0)*38.2;
double Level4=Level0+(Level100-Level0)*50.0;
double Level5=Level0+(Level100-Level0)*61.8;
double Level6=Level0+(Level100-Level0)*78.6;
I divide it by 100. And then what do I do? And how do I write the signals from these levels?
No one but you knows how you are going to use it. To start with, you have to check that it matches the original.