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

 

As for the algorithm for the top two fractals and the bottom one, and vice versa, there are a lot of nuances, it should all be analysed in detail during programming.

 
Example2:

Thanks for the tip, I really forgot to exit the loop, now it should definitely work, if you want I can post the indicator as a thank you.

You're welcome. The indicator is thanks, but if I do multivolume, I will write and test it on 5, it has much more possibilities.
 
Hello.
Can't figure out how to organise the programming code, please help:

I need to determine where (up or down) with each tick the value of the indicator (RSI) has changed.

It turns out that the first time (when you turn on the EA) should pass the code and only enter in a variable indicator value (RSI), with the second pass to another new variable value and compare them (to understand where the new value of the old). With the third tick to compare the new with the old value, etc.

So, with every new tick, the new value is compared to the old one.

So, I am sitting here and cannot figure out how to describe the code. Especially, how to make it execute for the first time only that part of the code where just the initial value of the variable is entered, so that with further ticks it has something to compare it with.

 
AlexeyVik: Second, if you don't set the channel width, what will you compare it with? How do you want to determine whether it is a channel or not? And third, imho, the average candle size will not work adequately. If all 10 bars are bullish, but the average bar size is not bigger than the check. Is it a channel or not? It may be a channel, but it's only a sloping one and we are parsing a horizontal one according to your drawing.

I have the following idea: the maximum and minimum of the last X candles are taken - if the difference between these min and max is less than the size of the average candle (for the specified period X) multiplied by the coefficient K, it means a channel. Now there are two variants of determining K depending on the length. Both variants work but we'd like to increase the precision if possible.

If I've got any other "universal" flat indicator/advisor that may work, please send it here or at least tell me its name.

 
pu6ka:

You're welcome. Thanks for the indicator, but if I'm going to do a multivolume, I'll be writing and testing on the 5, as there are much more possibilities there.
Files:
 
culler:
Hello.
Can't figure out how to organise the programming code, please help:

I need to determine where (up or down) with each tick the value of the indicator (RSI) has changed.

It turns out that the first time (when you turn on the EA) should pass the code and only enter in a variable indicator value (RSI), with the second pass to another new variable value and compare them (to understand where the new value of the old). With the third tick to compare the new with the old value, etc.

So, with every new tick, the new value is compared to the old one.

So, I am sitting here and cannot figure out how to describe the code. Especially, how to make it execute for the first time only that part of the code where just the initial value of the variable is entered, so that with further ticks it has something to compare it with.


As an alternative:

int prd = 14;                 // период RSI
double tick0 = -1;            // самый свежий текущий тик
double tick1 = -1;            // предыдущий тик

void OnTick()
{
  tick0 = iRSI(_Symbol, 0, prd, PRICE_WEIGHTED, 0);
  
  if(tick0 >= 0 && tick1 >= 0)
   {
     double difference = tick0 - tick1;
     
     // здесь остальная часть кода
     
   }
  
  tick1 = tick0;
} 
 

Is it possible to download charts for technical analysis, - indexes S & P 500 Futures Chart, TA 25 Chart, and the S & P 500 Chart if possible can prompt how to do this, maybe there is an explanation of how to download!

I can't find such a broker, can you advise a program for technical analysis, which allows me to download the indexes I'm interested in (can be in real time) or a broker.

Maybe there is an opportunity to download these indices MT-4 or MT-5. I'm just beginning to try to do technical analysis, I would very much like to hear expert advice on how to cope with my task.

I am very grateful in advance for your help.
 
yan720:

I have the following idea: the maximum and minimum of the last X candles are taken - if the difference between these min and max is less than the size of the average candle (for the specified period X) multiplied by the coefficient K, it means a channel. Now there are two variants of determining K depending on the length. The both variants are working but I want to increase the accuracy, if possible.

If you come across any other working "universal" flat indicator/advisor, please send it here or at least tell me its name.



This is an interesting approach. I think you should not improve anything. The only thing you have to do is to determine the K coefficient and connect the possible price movement after the breakdown of the channel with this K coefficient.

I wrote an Expert Advisor using one channel indicator but it determines the channel on High-Low for a certain period of time, uses global variables and has errors when moving from Friday to Monday. The indicator is not mine, the Expert Advisor's customer provided me with a link to it. I will probably rewrite it for your variant of channel definition.

Files:
 
AlexeyVik:

That's an interesting approach. And I don't think you need to improve anything. The only thing you have to do is to define K coefficient and connect with it the possible price movement after breakdown of the channel.

I wrote an Expert Advisor using one channel indicator but it determines the channel by High-Low for a certain time, uses global variables and has errors when moving from Friday to Monday. The indicator is not mine, the Expert Advisor's customer provided me with a link to it. I will probably rewrite it for your variant of channel definition.

Determination of coefficient is one of the tricky part of my approach, of course :) Thanks for the file.
 
I don't know how I can get the numbers of yesterday's bars from 00:00 to 23:59 at any time today (in the tester of course) correctly. Please tell me.