Re: Coding Help
Posted: Wed Apr 25, 2018 7:51 pm
Please add "Arrow on Newest" option in this indicator. Regards.
Post your queries/requests at one place,usually within belonging threads so you can have and know the answer,dont flood forum with same postsmehkhan wrote: Wed Apr 25, 2018 7:51 pm rsi ma mtf alerts + arrows 2.1.mq4
Please add "Arrow on Newest" option in this indicator. Regards.
Code: Select all
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 ForestGreen
double DUptick1[];
double DUptick[];
extern int PeriodOC=5;
//+------------------------------------------------------------------+
//| indicator initialization |
//+------------------------------------------------------------------+
int init()
{
IndicatorShortName("VolumeDif("+Symbol()+")");
SetIndexBuffer(0,DUptick);
SetIndexStyle(0,DRAW_HISTOGRAM,0,4);
return(0);
}
//+------------------------------------------------------------------+
//| indicator function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
int i,limit;
//----
if(counted_bars==0)
limit=Bars-PeriodOC;
if(counted_bars>0)
limit=Bars-counted_bars;
limit--;
for(i=limit; i>=0; i--)
DUptick1[i]= ((Volume[i]+(Close[i]-Open[i])/Point)/2);
DUptick[i]= DUptick1[i]-DUptick1[i+PeriodOC];
//----
return(0);
}
//+------------------------------------------------------------------+
This version working now,, added this quote from the indicator's creator ,Whistler Active Volatility Energy •Price Mass is not a directional oscillatorthiru wrote: Wed Apr 25, 2018 3:29 pm Hi mntiwana,
working on channel, found this code. it has no author or credits.
not compatible with new mt4 builts. will you be able to fix this, please?
thanks in advance.
//
Wave-Pm_smooth_multiple_alerts.mq4
Thank you MrTools, really appreciate your help.mrtools wrote: Fri Apr 27, 2018 9:43 am This version working now,, added this quote from the indicator's creator ,Whistler Active Volatility Energy •Price Mass is not a directional oscillator
it's more of a gauge of potential energy left in the distribution cycle from Mark Whistler's book "Volatility Illuminated".
How exactly is this supposed to look like? Because the bottom window does not show anythingmrtools wrote: Fri Apr 27, 2018 9:43 am
This version working now,, added this quote from the indicator's creator ,Whistler Active Volatility Energy •Price Mass is not a directional oscillator
it's more of a gauge of potential energy left in the distribution cycle from Mark Whistler's book "Volatility Illuminated".
Suspect the wave pm problem is the 1090 bug posted a version that should take care of it at the last post, will work on your code in a bit.shaileshm wrote: Fri Apr 27, 2018 2:49 pm
How exactly is this supposed to look like? Because the bottom window does not show anything
Also mrtools, can pls tell what I have done wrong in previous code, maybe the looping is not correct, how to get the difference on current candle from that of the one a few candles back?
Looking at the name guessing you were trying something like this one, also posting a version of blau tvi which uses a smoothed volume, maybe that will helpshaileshm wrote: Thu Apr 26, 2018 6:16 pm hi someone please help..i am trying to see the ticks as compared to those for a few candles back.
This is what I have coded
Unfortunately it does not display anything. Please some tell me how to code it correctly.Code: Select all
#property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 ForestGreen double DUptick1[]; double DUptick[]; extern int PeriodOC=5; //+------------------------------------------------------------------+ //| indicator initialization | //+------------------------------------------------------------------+ int init() { IndicatorShortName("VolumeDif("+Symbol()+")"); SetIndexBuffer(0,DUptick); SetIndexStyle(0,DRAW_HISTOGRAM,0,4); return(0); } //+------------------------------------------------------------------+ //| indicator function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); int i,limit; //---- if(counted_bars==0) limit=Bars-PeriodOC; if(counted_bars>0) limit=Bars-counted_bars; limit--; for(i=limit; i>=0; i--) DUptick1[i]= ((Volume[i]+(Close[i]-Open[i])/Point)/2); DUptick[i]= DUptick1[i]-DUptick1[i+PeriodOC]; //---- return(0); } //+------------------------------------------------------------------+