[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 90

 

Can you suggest a math function that can be used to round as follows:

I am calculating Fibo levels for a stop loss in the code. The calculation may result in e.g. 4332.8.

I am working on Dax futures and the quotes only end at 0 or 5 - 4332.5 or 4333.0 in this case.
How can I round the Fibo to these numbers?

 
Can you please tell me how to enumerate all the existing symbols at the broker in the loop, whether it is currencies, futures, indices, or anything else, the problem is for example the following-is an indicator that shows the favorable conditions for entry-would like to implement a one-step run on all symbols that would be visible in what symbol favorable situation. Is it possible?
 
Dimoncheg >> :
Can you please tell me how to enumerate all the existing symbols at the broker in the loop, whether it is currencies, futures, indices, or anything else, the problem is for example, there is an indicator that shows the favorable conditions for entry-would like to implement a single-step run through all the symbols that would be visible on what symbol favorable situation. Is it possible?

https://www.mql5.com/ru/search

 
luka писал(а) >>

Can you suggest a math function that can be used to round as follows:

I am calculating Fibo levels for a stop loss in the code. The calculation may result in e.g. 4332.8.

I work on dax futures, there quotes only end in 0 or 5 - 4332.5 or 4333.0 in this case.
How do you round a fibo to these numbers?

Try this formula

y=MathCell(x*2)/2;

where x - unknown value

y is present value

 

Why does it not work?


double marker = 0.8 ;


if ( marker == 0.8 )

{

marker = marker - 0.2 ;

Print (" 1 ", " marker ", marker ) ;

}


if (marker == 0.6)

{

Print (" 2 ") ;

}


 

Thank you

 
columbus >> :

Why doesn't it work?

Only the 2nd print doesn't work, and absolutely rightly so. Read about correct work with double. And about NormalizeDouble in particular.

 
The MA indicator gives wrong readings.
Instead of slowly decreasing the reading, for example, when it moves downwards, it may jump by many points.
decrease the reading, it may jump suddenly by many points at once.
Please advise how to "make" the MA move without such jerks?
The figure is attached.
Files:
graph.zip  30 kb
 
Oper >> :
The MA indicator is giving wrong readings.

Right, the mouse is discrete and you want continuity from it. The mouse shows the value that is at the time cut-off closest to the mouse.

 
TheXpert >> :

True, the mouse is discrete and you want continuity from it. The mouse shows the value that is at the time cut-off closest to the mouse.

I studied one section of the MA thoroughly. There can be no mistakes. I put the mouse on one point,

I memorised the location and the value. Then I moved it strictly one millimetre higher - the value changed to

2 points.But then moved it again (strictly by a millimetre !) and the value changed dramatically by 8(!) points.

I checked it one hundred times.

after the candle closes, but the value jumps a hundred percent.

Reason: