RSI Sensitivity - Help

 

Hello everyone!


I have developed an indicator to draw RSI sensitivity (for the sake experiment). What I want it to draw, is two lines which gives RSI sensitivity each for a bearish and bullish candle. But it draws nothing. Can anyone help me to find where I took the wrong turn? The code is attached.


Also, is there anyone to tell me where I can find error log when an indicator draws nothing???

Files:
 
  1. APourfarzaneh: where I can find error log when an indicator draws nothing???
    Unless there is an error, you won't find anything in the log. If it is coded wrong, coded to not draw, that is not an error.

  2. Always use strict. Fixing the warnings will save you hours of debugging.
              Program Properties (#property) - Preprocessor - Language Basics - MQL4 Reference

  3. Drop your new bar code. Inappropriate for indicators.

  4. extern int                 tot_bars              = 2000;
    :
       Counted_bars = tot_bars;    // Number of counted bars
       for (i=Counted_bars; i>0; i--){
           Price_Val[i] =
    Unless you have more than 2K bars in history, you get array exceeded. You would know that if you had used strict.

  5. Start using the new Event Handling Functions.
              Event Handling Functions - Functions - Language Basics- MQL4 Reference
              How to do your lookbacks correctly.

 
whroeder1:
  1. Unless there is an error, you won't find anything in the log. If it is coded wrong, coded to not draw, that is not an error.

  2. Always use strict. Fixing the warnings will save you hours of debugging.
              Program Properties (#property) - Preprocessor - Language Basics - MQL4 Reference

  3. Drop your new bar code. Inappropriate for indicators.

  4. Unless you have more than 2K bars in history, you get array exceeded. You would know that if you had used strict.

  5. Start using the new Event Handling Functions.
              Event Handling Functions - Functions - Language Basics- MQL4 Reference
              How to do your lookbacks correctly.

Thank you so much.


I used strict Preprocessor and managed to find and fix some warnings and eventually get two lines (though without any Event Handling Function). 'will try to work on that.

 
APourfarzaneh:

Thank you so much.


I used strict Preprocessor and managed to find and fix some warnings and eventually get two lines (though without any Event Handling Function). 'will try to work on that.

Line 124 - RSI_N = ... - shouldn't it be RSI_N1 = ...?

Reason: