[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 138

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
why do you specify 15??? you need 10
First I say:
ArrayResize(m, 10)
...
I fill 10 elements with values.
Then I find out I need more space for five more elements and say:
ArrayResize(m, 15).
So, the original 10 elements retain their values.
Got it ?
Can you tell me how to find out if the terminal is turned on and how to set all open orders and tickets created by the same EA?
I have two stochastics on H4 and M15. When "H4 from 20 to 80 + going up" + "on M15 the main line crosses the signal line from bottom to top + M15 below 50" = this is a buy signal (vice versa - sell signal).
So for visual analysis on these signals I try to put vertical lines (I wanted green line to buy and red line to sell, but I failed). I am writing this as an EA and I always draw only 2 lines on the first 2 signals and that's it. I can not understand why all the signals are not plotted. I have tried different timeframes for tester (3, 6 months), the result is the same. Please tell me the error:
//--------------------
int init()
{
return(0);
}
int deinit()
{
return(0);
}
int start()
{
double SH4_0=iStochastic(0,PERIOD_H4,20,3,3,MODE_SMMA,1,MODE_SIGNAL,0);
double SH4_1=iStochastic(0,PERIOD_H4,20,3,3,MODE_SMMA,1,MODE_SIGNAL,1);
double M15_0=iStochastic(0,PERIOD_M15,17,5,5,MODE_SMA,1,MODE_MAIN,0);
double SM15_0=iStochastic(0,PERIOD_M15,17,5,5,MODE_SMA,1,MODE_SIGNAL,0);
double M15_1=iStochastic(0,PERIOD_M15,17,5,5,MODE_SMA,1,MODE_MAIN,1);
double SM15_1=iStochastic(0,PERIOD_M15,17,5,5,MODE_SMA,1,MODE_SIGNAL,1);
int i=1;
if((SH4_0>SH4_1)&&(SH4_0>20)&&(SH4_0<80)&&(SM15_1>M15_1)&&(SM15_0<M15_0)&&(SM15_0<50))
{
ObjectCreate("line "+i, OBJ_VLINE, 0, Time[0], 0);
i++;
}
if((SH4_0<SH4_1)&&(SH4_0>20)&&(SH4_0<80)&&(SM15_1<M15_1)&&(SM15_0>M15_0)&&(SM15_0>50))
{
ObjectCreate("line "+i, OBJ_VLINE, 0, Time[0], 0);
i++;
}
return(0);
}
put the i variable and its initialisation before start()
or put static int i=1;
put the i variable and its initialisation before start()
or put static int i=1;
I wonder why the average number of changes (sumpos+(-sumneg))/2 is not absolutely correlative
with their ratio in a 100-point scale sumpos/(sumpos+sumneg)*100 and which option is correct.
For the convenience of tracing the correlation, the first is multiplied by 2 (doubled amplitude) and 50 is subtracted from the second (i.e. the scale is from -50 to 50)
is completely correlative
not absolutely correlated
LOL ))
Where (which industry) do you know the absolute correlation ;) call things by their proper names ).
Читаем https://ru.wikipedia.org/wiki/%D0%9A%D0%BE%D1%80%D1%80%D0%B5%D0%BB%D1%8F%D1%86%D0%B8%D1%8F
is not absolutely correlated.