Indicators with alerts/signal - page 1214

 
Abhinav:
No mladen actually time starts here on GCI demo at 23:45, thats why it is comming on 3:15 , that is not the issue. The main thing is can color change be delayed by 30minutes on a 30minute chart so that when we plot it on 1min chart it does not repaint.

Regards,

Abhinav

Abhinav

Lets assume this (using regular 30 minute chart times) : a new 30 minute bars starts at nn:00 and lasts till nn:29. At nn:30 a new 30 minute bars starts and lasts till nn:59. So, on a lower time frame bar, the higher 30 minute bars must start and end at those same times - all 1 minute bars from nn:00 to nn:29 belong to one 30 minute bar while all 1 minute bars from nn:30 to nn:59 belong to another 30 minute bars

 
mladen:
Abhinav Lets assume this (using regular 30 minute chart times) : a new 30 minute bars starts at nn:00 and lasts till nn:29. At nn:30 a new 30 minute bars starts and lasts till nn:59. So, on a lower time frame bar, the higher 30 minute bars must start and end at those same times - all 1 minute bars from nn:00 to nn:29 belong to one 30 minute bar while all 1 minute bars from nn:30 to nn:59 belong to another 30 minute bars

Thats right mladen the higher 30 minute bars must start and end at those same times on the 1min chart, but can we add an intentional delay of 30min in the coding algo so as to make it look non repainting for the 1min chart. This kind of indicator may not look good in higher time frames but it will then look much exact on 1min chart with no repainting

 
Abhinav:
Thats right mladen the higher 30 minute bars must start and end at those same times on the 1min chart, but can we add an intentional delay of 30min in the coding algo so as to make it look non repainting for the 1min chart. This kind of indicator may not look good in higher time frames but it will then look much exact on 1min chart with no repainting

You can (just add "-1" to the index part of any iCustom() call to higher time frame - but then you shall never see the higher time frame current bars state until it is closed)

 

Upgraded Gann T3 high low activator (histogram version, multi time frame with alerts) : gann_t3_high-low_activator_histo_alerts_2.mq4

 

Upgraded, simplified the code, made it more user friendly and corrected some possible errors in the alerts on Fiji Trend_alerts mtf.

 

Upgraded version of dpo T3 cross histo_mtf+alerts.

 
mladen:
You can (just add "-1" to the index part of any iCustom() call to higher time frame - but then you shall never see the higher time frame current bars state until it is closed)

mladen thankyou very much for your guidance. As adviced by you and after some hit and trial i changed the following peice of code :

for (i=limit; i>=0; i--) macd = iMA(NULL,0,FastMa,0,FastMaMode,FastMaPrice,i) - iMA(NULL,0,SlowMa,0,SlowMaMode,SlowMaPrice,i);

for (i=limit; i>=0; i--) sign = iMAOnArray(macd,0,SignMa,0,SignMaMode,i);

to this:

for (i=limit; i>=0; i--) macd = iMA(NULL,0,FastMa,0,FastMaMode,FastMaPrice,i+1) - iMA(NULL,0,SlowMa,0,SlowMaMode,SlowMaPrice,i+1);

for (i=limit; i>=0; i--) sign = iMAOnArray(macd,0,SignMa,0,SignMaMode,i+1);

Can you please check it bcoz i m not at all a coder.

Regards,

Abhinav

 
Abhinav:
mladen thankyou very much for your guidance. As adviced by you and after some hit and trial i changed the following peice of code :

for (i=limit; i>=0; i--) macd = iMA(NULL,0,FastMa,0,FastMaMode,FastMaPrice,i) - iMA(NULL,0,SlowMa,0,SlowMaMode,SlowMaPrice,i);

for (i=limit; i>=0; i--) sign = iMAOnArray(macd,0,SignMa,0,SignMaMode,i);

to this:

for (i=limit; i>=0; i--) macd = iMA(NULL,0,FastMa,0,FastMaMode,FastMaPrice,i+1) - iMA(NULL,0,SlowMa,0,SlowMaMode,SlowMaPrice,i+1);

for (i=limit; i>=0; i--) sign = iMAOnArray(macd,0,SignMa,0,SignMaMode,i+1);

Can you please check it bcoz i m not at all a coder.

Regards,

Abhinav

Abhinav

The way you wrote, even in a current time frame, instead of showing current value on a currently opened bar it will show the value of the first closed bar. If that is what your intention is, than the code is OK

 
mladen:
Abhinav The way you wrote, even in a current time frame, instead of showing current value on a currently opened bar it will show the value of the first closed bar. If that is what your intention is, than the code is OK

Yes mladen, actually i wont be using higher timeframes and what i want on lower time frame is no repainting

 
Abhinav:
Yes mladen, actually i wont be using higher timeframes and what i want on lower time frame is no repainting

Abhinav

Updating the current bar is not repainting (and it never was)

What you get the way you make it is an indicator that is always lagging 1 bar (that is why I told that if that is your intention, then it is OK). But that you can always achieve with checking for signals only on first closed bar, instead of checking fr signals on current (still opened) bar.

Reason: