Indicator Not Updating / Repainting Automatically, How ?

 

Hi coders, I'm learning programming now to develop a simple Stochastic indicator. I don't know what codes are lack of resulting the indicator wasn't updated automatically.

Upon a New Bar is launched, there are 2 issues :-

1) Stochastic "< 80" or "> 20", the DotLine wasn't removed automatically

2) My settings are for(int i=0; i<=50; i++), i.e. up to Max Shift of 50, but from Shift 51 onwards, the DotLine wasn't removed automatically

Kindly help to modify my indicator so that it can update the DotLines automatically without any human intervention. Thanks.


Stochastic Oscillator - Oscillators - Technical Indicators - Price Charts, Technical and Fundamental Analysis - MetaTrader 5 Help
Stochastic Oscillator - Oscillators - Technical Indicators - Price Charts, Technical and Fundamental Analysis - MetaTrader 5 Help
  • www.metatrader5.com
The Stochastic Oscillator Technical Indicator compares where a security’s price closed relative to its price range over a given time period. The...
Files:
Test_Indi.mq4  4 kb
 
Chin Min Wan:

Hi coders, I'm learning programming now to develop a simple Stochastic indicator. I don't know what codes are lack of resulting the indicator wasn't updated automatically.

Upon a New Bar is launched, there are 2 issues :-

1) Stochastic "< 80" or "> 20", the DotLine wasn't removed automatically

2) My settings are for(int i=0; i<=50; i++), i.e. up to Max Shift of 50, but from Shift 51 onwards, the DotLine wasn't removed automatically

Kindly help to modify my indicator so that it can update the DotLines automatically without any human intervention. Thanks.


Please check this indicator

Files:
Test_Indi.mq4  4 kb
 
Biantoro Kunarto #:

Please check this indicator

Thanks, I'll test it.