Coding help - page 777

Algo_W
7
Algo_W  

I am not sure how to implement IMaOnArray for this. I think that is the solution? Can anyone help me get the moving average of the ADX for the histogram?

Thank you

Files:
Nagisa Unada
637
Nagisa Unada  
Algo_W:

I am not sure how to implement IMaOnArray for this. I think that is the solution? Can anyone help me get the moving average of the ADX for the histogram?

Thank you

#property indicator_type1 DRAW_LINE

#property indicator_type1 DRAW_LINE
for(int i = limit-1; i >= 0; i--)
   Buffer1[i] = iADX(NULL, PERIOD_CURRENT, 14, PRICE_CLOSE, MODE_MAIN, i);
   
for(i = limit-1; i >= 0; i--)   
   Buffer2[i] = iMAOnArray(Buffer1, 0, 5, 0, MODE_SMA, i);
Mkurugenzi
74
Mkurugenzi  
Naguisa Unada:

Hi Naguisa!

I trust your well?

I want to appreciate and say thank you for tweaking the mtf BB indcator. i can tell you its working like a charm.


Naguisa! Just to inquire further if i may , can this indicator be tweekable so that one may see different custom time-fames say like Fibonacci numbers or any odd and even time-frames and not necessarily the ones for MT4 only. is that possible, kindly?

guner
436
guner  

coding help please.

how can ı code

ad right ray to a ma end point.?

Marcin Madrzak
472
Marcin Madrzak  
guner:

coding help please.

how can ı code

ad right ray to a ma end point.?

Draw trend object with PRICE1 and PRICE2 values equal to value of your chosen MA on bar 0 and TIME1 equal to time of bar 0 while TIME2 is somwhere in the future. On every tick recalculate MA and set PRICE1 & PRICE2 accordingly and on every new bar set new TIME1.

isotropicfun
5
isotropicfun  

Hi all,


I'm studying Mark Whistler's "Volatility illuminated" book and I'm interested to dig deeper in the indicators he built, especially the WAVE-PM
Whistler published the mq4 code on the book and there is a copy also here http://fxcodebase.com/code/viewtopic.php?f=38&t=64011 

However my intention is to port the indicator to tradingview since is my main charting platform, I know some pinescript basic but I find really hard to read into the C like code of the original script
Can someone give a look to the code and tell me roughly just the logic of what it does?

On the book Whistler don't say much about the indicator, just that " is visually identifying the 'compression' of the short-term distribution within the larger distribution. "



For what I've understood the oscillator represent the difference between upper and lower bands of a bollinger band, then the value is normalized in a range of 0-1 and plotted along the time

In the code I see that two oscillators are created (ShortBandsPeriod and LongBandsPeriod) but then I loosing myself into the for cycles...I can only see that there are some math calculations (a square, a exponent power, and a tangent?) but unfotunately can't grasp why and how are made

.
.
.
for (i=limit; i>=0; i--){
   
             
                avg= iMA(NULL,0,ShortBandsPeriod,0,MODE_SMA,PRICE_CLOSE,i+ShortBandsShift);
                
                sum=0;
                
                for (j=ShortBandsPeriod-1; j>=0; j--){
                 temp = Close[i+j] - avg;
                 sum = sum + temp * temp;
                }
         
                ShortDev[i]= ShortBandsDeviations * MathSqrt(sum / ShortBandsPeriod);
        ShortDev1[i] = MathPow((ShortDev[i] / Point), 2);
                
                
                    //if  ( i < limit - Chars)
                        //{
         
                        
                          temp=0;
                                for (j=Chars-1; j>=0; j--){                             
                                 temp = temp + ShortDev1[i+j];
                                }
                        
            temp = MathSqrt(temp / Chars) * Point;
            if (temp != 0)
                        {
                temp = ShortDev[i] / temp;
            }

                                
         
                        ShortOscillator[i] = MathTanh(temp);
                                
                   //}
   }
.
.
.


    So any help, suggestion or hint is appreciated, thanks!

Files:
WAVE-PM.mq4 5 kb
cp1989
5
cp1989  

Hi,guys,could some coders help modify this fisher indicator.

yes ,its a very old indicator and repaint,however it has some valuable information. i want to analysis the state of the indicator when every candle closed.i‘ll be appreciated.

We don't change the repaint function,just add auto-refresh.Make the indicator refresh and record the state when every candle closed,but don't refresh itself during the next candle is starting.

sorry for my bad English.thanks in advance.

Files:
fisher1.mq4 3 kb
Mkurugenzi
74
Mkurugenzi  

Hi Guys!

I trust your all well?

I found this indicators in the dynamic zone forum but there not working as such and if any generous coder may fix them, i would highly appreciate them.

Am attaching them in here,

My sincere appreciation in advance.

Mkurugenzi
74
Mkurugenzi  
Mkurugenzi:

Hi Guys!

I trust your all well?

I found this indicators in the dynamic zone forum but there not working as such and if any generous coder may fix them, i would highly appreciate them.

Am attaching them in here,

My sincere appreciation in advance.

@Naguisa Unada


I trust your well?


Kindly, are you in a position to view my last post above and see if you are in a position to at-least retouch some if not all of the indicators to work?


your effort and time and resource is appreciated in advance. 

AlwaysTilt
15
AlwaysTilt  

Hey coders! Can someone help me to modify this EA? 

This is a simple buy low sell high EA throwing out Limit orders ever x minutes that last x minutes/hours. 


What I think would improve it is to add a filter to it. Lets say stochastics or RSI..

So when stochastic is lower than 40 = launch the buy limits

And when stochastic is higher than 60 = launch the sell limits

And in between it doesnt launch anything



Is this possible? Thanks in advance.

I attach the EA 


I have used the EA "manually" by deciding running it longside or shortside with good results. 

Files: