Metatrader 5 versions of indicators ... - page 12

 
mladen:

sebastianK

Here is a version in which you can adjust 4 levels (the 3 main levels are calculated using high/low period parameter)


Thank you :)
 

This is one more possible way of making macd


It does not have signal line and it does not have the price. Instead it is calculating 4 macd values (of open.close, high and low) and constructs macd from those 4 values as candles. Color of the candles (and the "trend" that macd should show) depends on the macd of open and close (not on a slope or something similar). The result is something like this :


A deviation was made in the calculation : I decided to allow the 4 types of averages to be used (even though by definition of Gerald Appel the macd is calculated as ema(fast)-ema(slow)) so we can have a macd of sma (upper, smma (middle) and lwma (lower) too (the upper example is macd of ema) - all using same calculating periods


Files:
 

This is an indicator that generates simulated data for any period - but in seconds


PS: this indicator is not bars based or tick based. It strictly works based on a time. Ie: it generates a new bar with open,close, high and low for the given period in seconds. One version was posted already (here : https://www.mql5.com/en/forum/187056 ) but that version was depending on ticks for display (not for data update though). This version does not depend on ticks at all (it works even today - creating a flat line, since there is no price change, but it works) and this version is able to display data even when ticks in regular sessions are not coming in

Also, pay attention that starting multiple instances of the same indicator with same settings at different time will not produce same "chart" : the data will be different

PS: it is not generation offline data


 
mladen:

This is an indicator that generates simulated data for any period - but in seconds


PS: this indicator is not bars based or tick based. It strictly works based on a time. Ie: it generates a new bar with open,close, high and low for the given period in seconds. One version was posted already (here : https://www.mql5.com/en/forum/187056 ) but that version was depending on ticks for display (not for data update though). This version does not depend on ticks at all (it works even today - creating a flat line, since there is no price change, but it works) and this version is able to display data even when ticks in regular sessions are not coming in

Also, pay attention that starting multiple instances of the same indicator with same settings at different time will not produce same "chart" : the data will be different

PS: it is not generation offline data


Is ther no way to have it for mt4?
 
sebastianK:
Is ther no way to have it for mt4?
Not in that form
 
mladen:
Not in that form
Can it be made in any form for mt4?
 
poster:
Can it be made in any form for mt4?

If we use objects for bars (and hidden buffers)then it can be done

Will see what how it can be made

 
Hello Mladen! I have a three-dimensional indicator is calculated levels.

How to make the code to count total volume for the selected period of time.

Example.. 

Files:
VP-Range-v6.ex5  61 kb
VP-Range-v6.mq5  44 kb
Example.png  28 kb
 
Nikki69:
Hello Mladen! I have a three-dimensional indicator is calculated levels.

How to make the code to count total volume for the selected period of time.

Example.. 

You could do something like this (just an example, but you shall easily adjust it to your needs in the code) :

   datetime startTime=time[rates_total-100];
   datetime endTime  =time[rates_total-1];
   long volumeArray[]; 
         if (UseTickVolume)
               CopyTickVolume(_Symbol,_Period,startTime,endTime,volumeArray); 
         else  CopyRealVolume(_Symbol,_Period,startTime,endTime,volumeArray); 
   double volumeSum=0; for (int i=ArraySize(volumeArray)-1; i>=0; i--) volumeSum+= volumeArray[i];
 
mladen:

If we use objects for bars (and hidden buffers)then it can be done

Will see what how it can be made

Any result on that?