Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 858
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
Print using the DoubleToString function and you will get the 5 digits you want. If you want, you can also get 8.
In other words, indicator calculations in the Expert Advisor are performed to 5 decimal places and Print will cut the result to 4 decimal places when it is displayed in the Journal?
The calculation result can be up to 16 decimal places if it is not normalised:
The output of the calculation directly via Print is not cut. There is something else in the code, normalization, for example.
That's the thing, there's nothing else (normalisations, etc.):
double g_macd=iCustom(Symbol(), PERIOD_M1, "g_MACD",12, 26, SignalSMA, 1, 0);
Print ("g_macd=",g_macd);
g_MACD has a value (of the 1st buffer) in the indicator to the 5th decimal place, while Print in the log shows a value to the 4th decimal place, which is not acceptable.
How to solve this problem?
That's the thing, there's nothing else (normalisations, etc.):
double g_macd=iCustom(Symbol(), PERIOD_M1, "g_MACD",12, 26, SignalSMA, 1, 0);
Print ("g_macd=",g_macd);
g_MACD has a value (of the 1st buffer) in the indicator to the 5th decimal place, while Print in the log shows a value to the 4th decimal place, which is not acceptable.
How to solve this problem?
Look in your code, the problem is somewhere there.
To test it, I ran a simple script with WPR call and printed the result of indicator call:
The indicator itself, as you know, shows values with 4 decimal places in its window, but for Expert Advisors it shows 13 and even 14.
Hello! Please look at the code below, creation of "Arrow" object on the signal, arrows are not drawn in the tester, although the log passes, and also in the log on startup in the tester writes an error TestGenerator: unmatched data error (volume limit 412 at 2014.10.13 17:10 exceeded),
And during testing it gives out an error "Checking USDJPYm,M5 arrow: Error in object creation: code #4200" - but I guess this is normal, because at first the program finds that the object was created, and after deleting it, creates it again. In general, I would be grateful for your comments to the questions.
Do not judge strictly as written.
Folks, help me out with the arrows, please!!!
Folks, help me out with the arrows, please!!!
Figure out this line.
Look where the arrow is drawn.
Figure out this line
Look at where the arrow is drawn.
I have now got the arrows and they are moving from signal to signal according to the points,
I can then analyze the triggering of the signal on the chart?
Thank you, Alexey! It helped, now the arrows appear and move from signal to signal by points, but how should I make the arrows appear and stay in their places on each signal?
I can then analyze the triggering of the signal on the chart?
Thank you, Alexey! It helped, now the arrows appear and move from signal to signal by points, but how do I make the arrows appear and stay in their places on each signal?
I can then analyze the triggering of the signal on the chart?