Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 483
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
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
}
There's a lot of interesting stuff waiting for you here.
Thank you. Thank you.
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.
A very useful thread, and on your question!
Please explain what it means: "A chart subwindow may be hidden due to visibility properties of the indicator placed in it"? What is this indicator property????
Doesn't stopplay return an int?
The compiler gives a warning "possible loss of data due to type conversion" to this code:
Help is needed, part of the position is not closing when testing the EA
Help is needed, part of the position is not closing when testing the EA
Doesn't stopplay return an int?
The compiler generates the "possible loss of data due to type conversion " warning on code like this:
Explicit type conversion:
See... The function is of type double, but the request identifier can define the return type int. That's why it's swearing.I'm optimising an EA, there's a lot of overshoot, about 10^17 degrees, there are more parameters, but they can't be optimised any more. Why are there such restrictions?
Plus a question on genetic algorithm. It seems to stop working properly on such big data, the final profit jumps quite dramatically, often downwards. That is, now it has found profitable settings, but not any other time. Are the developers going to fix it?
I'm optimising an EA, there's a lot of overshoot, about 10^17 degrees, and there are more parameters, but they can't be optimised anymore. Why are there such restrictions?
Plus a question on genetic algorithm. It seems to stop working properly on such big data, the final profit jumps quite dramatically, often downwards. That is, now it has found profitable settings, but not any other time. Are the developers going to fix it?
I gave up on this "genetic algorithm" a long time ago. Mathematics requires precision, and with this genetic algorithm we risk "spilling the baby"! It's better to optimize on the opening of bars on M1! You'll get better results and save time! There is no point in chasing on ticks, they lie immensely!