Hi coders, I hope you can help to mod my attached "Stochastic+ArrowSig.mq4" indicator to add arrows on the candle's at the main-window. Due to I have no programming background, I have been trying many days but yet failed.
Kindly open my attached indicator "Stochastic+ArrowSig.mq4", I have personally added the following codes :-
Could you please help to mod and put the relevant codes into the indicator "Stochastic+ArrowSig.mq4" so that whenever the indicator is loaded onto a chart, it will automatically show the arrows on the candles at the main-window :-
1) Over-bought (OB) arrow down (code 234) will be shown below the candle's Low price
2) Over-sold (OS) arrow up (code 233) will be shown above the candle's High price
Kindly bear in mind that the arrows should be auto-repainting, i.e. whenever the user :-
1) change of TF
2) change of User Input Variable parameters
3) a new bar is launched
4) whenever the user clicks the "Compile" button in MetaEditor
5) unload the indicator (in my opinion, should be at void OnDeinit)
For (1) to (4), the indicator should update the arrows correctly and promptly. For (5), whenever the user unloads the indicator, all the arrows on chart should be removed completely.
Lastly, I need your mod "Stochastic+ArrowSig.mq4" indicator source codes so that I can learn coding, highly appreciated.
Thank you.
Kindly open my attached indicator "Stochastic+ArrowSig.mq4", I have personally added the following codes :-
Inserted Code
//--- User Input Parameters at LINE 27 input double OBlevel=80; // Over-Bought Level input double OSlevel=20; // Over-Sold Level input int arrowWidth=2; input int arrowOBCode=234; // OB Arrow Down Code (put below Low Price) input int arrowOSCode=233; // OS Arrow Up Code (put above High Price) input color arrowOBColor=clrRed; input color arrowOSColor=clrLime; //--- Buffers at LINE 41 double OBOS[]; // Over-bought & Over-sold (based on Sign[]) ArraySetAsSeries(OBOS,false); // at LINE 99 //--- OB Over-bought & OS Over-sold (based on Sign[]) at LINE 159 for(i=pos; i<rates_total && !IsStopped(); i++) { if(Sign[i+1]>=OBlevel && Sign[i]<Sign[i+1] && Sign[i+1]>Sign[i+2] && Sign[i+2]>Sign[i+3] && Sign[i+3]>Sign[i+4]) OBOS[i]=Sign[i]; if(Sign[i+1]<=OSlevel && Sign[i]>Sign[i+1] && Sign[i+1]<Sign[i+2] && Sign[i+2]<Sign[i+3] && Sign[i+3]<Sign[i+4]) OBOS[i]=Sign[i]; }
Could you please help to mod and put the relevant codes into the indicator "Stochastic+ArrowSig.mq4" so that whenever the indicator is loaded onto a chart, it will automatically show the arrows on the candles at the main-window :-
1) Over-bought (OB) arrow down (code 234) will be shown below the candle's Low price
2) Over-sold (OS) arrow up (code 233) will be shown above the candle's High price
Kindly bear in mind that the arrows should be auto-repainting, i.e. whenever the user :-
1) change of TF
2) change of User Input Variable parameters
3) a new bar is launched
4) whenever the user clicks the "Compile" button in MetaEditor
5) unload the indicator (in my opinion, should be at void OnDeinit)
For (1) to (4), the indicator should update the arrows correctly and promptly. For (5), whenever the user unloads the indicator, all the arrows on chart should be removed completely.
Lastly, I need your mod "Stochastic+ArrowSig.mq4" indicator source codes so that I can learn coding, highly appreciated.
Thank you.
Attached File(s)
Stochastic+ArrowSig.mq4
5 KB
|
46 downloads