Indicators with alerts/signal - page 1215

Abhinav
35
Abhinav  
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

Mladen Rakic
154501
Mladen Rakic  
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

Abhinav
35
Abhinav  
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

Mladen Rakic
154501
Mladen Rakic  
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.

Abhinav
35
Abhinav  
mladen:
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.

Yes mladen you are perfectly right that it was not a repainting indicator. And indeed if we use the indicator in current time frame then everything is fine, little problem say while backtesting occurs in smaller timeframes. What change i wanted is useful only for some limited situations only.

Regards,

Abhinav

jean-francois claudeville
94
jean-francois claudeville  

Morning all

This indicator "DSS of LWMA 2" seems excellent. Is it possible to have alarm please ?

jf

Files:
ayan2030
350
ayan2030  

mladen/mrtools can you please add arrows and alerts on color change

Files:
st_mu.mq4 8 kb
Mladen Rakic
154501
Mladen Rakic  
celte83:
Morning all

This indicator "DSS of LWMA 2" seems excellent. Is it possible to have alarm please ?

jf

jf

On slope change I assume?

jean-francois claudeville
94
jean-francois claudeville  
mladen:
On slope change I assume?

Yes Mladen on change color please

Thanks

jf

Mladen Rakic
154501
Mladen Rakic  
celte83:
Yes Mladen on change color please

Thanks

jf

jf

here you go, try it out : dss_of_lwma__alerts_2.mq4