Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 482

 
evillive:

with a 50% chance

Can you advise indicators if there are any and at least approximate settings if not difficult, or what is the method of determination in general?
 
Any indicator will give a 50% probability over a long period. There are no predictor-guessers so that they consistently show the future correctly for a long time.
 
evillive:
Any indicator will give a 50% probability over a long period. There are no predictor-guessers so that they consistently show the future correctly for a long time.

I understand that you can give an example of any indicator and on what timeframe and what settings?
 
There are plenty of them in the kodobase, so you have to choose
 

Can you tell me how to programmatically take the data of the MA indicator (iMA) on a closed/formed candle(for example: (n) candles back from the current unformed candle)?

I am struggling with indicator re-drawing. I want to take data that does not change.

 
culler:

Can you tell me how to programmatically take the data of the MA indicator (iMA) on a closed candle/formed candle (for example: (n) candles back from the current candle not formed)?

I struggle with re-drawing of the indicator. I want to take the data which doesn't change anymore.


double MA = iMA(NULL,0,period,0,MODE_EMA,PRICE_OPEN,0);

On this example, the data is taken from the 0 bar (the last parameter)

double MA1 = iMA(NULL,0,period,0,MODE_EMA,PRICE_OPEN,1);

Here it is taken from the first formed bar.

 
r772ra:

In this example, the data is taken from bar 0 (last parameter)

Here, from the first one generated.



Thank you
 
evillive:
https://www.mql4.com/ru/search#!keyword=%D1%83%D0%B3%D0%BE%D0%BB%20%D1%82%D1%80%D0%B5%D0%BD%D0%B4%D0%BE%D0%B2%D0%BE%D0%B9

Thank you, I'll be looking into it.

 

Help me solve a problem to determine the moment of intersection of two MA lines.

I can't figure out how to describe it.

There are MAfast and MAslow

double MAfast=iMA(NULL,0,9,0,MODE_EMA,PRICE_CLOSE,1);

double MAslow=iMA(NULL,0,21,0,MODE_EMA,PRICE_CLOSE,1);

if(MAfast>MAslow) it works only if MAfast is on the bottom, when it crosses it, it catches the moment of crossing, but then MAfast is on top and the order goes BUY ))))

I have it in my code how to determine the moment of crossing and compare its direction from down to up or vice versa.

In my code it is simply more or less. Hence the errors.

 
culler:

Help me solve a problem to determine the moment of intersection of two MA lines.

I can't figure out how to describe it.

There are MAfast and MAslow

double MAfast=iMA(NULL,0,9,0,MODE_EMA,PRICE_CLOSE,1);

double MAslow=iMA(NULL,0,21,0,MODE_EMA,PRICE_CLOSE,1);

if(MAfast>MAslow) it works only if MAfast is on the bottom, when it crosses it, it catches the moment of crossing, but then MAfast is on top and the order goes BUY ))))

I have it in my code how to determine the moment of crossing and compare its direction from down to up or vice versa.

In my code it is simply more or less. Hence the errors.

if ((x1 - y1)*(x2 - y2) < 0)
{
// we have intersection
}
Reason: