Needed help for Stochastic divergence line , please....

 
I working a stochastic divergence with automatic divergence line, and i did it ....when i start open in 1 hour the line is perfect but if i change to another period the line from 1 hour is still exist and mix with 4 hour line . did someone can help me for solf this problem ? Thankyou .
 
Delete your old line objects in init()
 
phy:
Delete your old line objects in init()

Hallo phy ... basicly i'm not a programer ... i just combine a code base from stochastic with another code base.

So can you help me to see my stochastic_Divergence codebase and repair the code base ?

Thankyou ...

 

Try changing:

if(StringSubstr(label, 0, 19) != "Stochastic_DivergenceLine")
continue;
ObjectDelete(label);

to

if(StringFind(label, "Stochastic_DivergenceLine",0) >= 0) ObjectDelete(label);

 
phy:

Try changing:

if(StringSubstr(label, 0, 19) != "Stochastic_DivergenceLine")
continue;
ObjectDelete(label);

to

if(StringFind(label, "Stochastic_DivergenceLine",0) >= 0) ObjectDelete(label);

Thankyou phy ... it's working ...

thankyou verymuch ... excelence ...