as always, the first steps are the most difficult ones, so I appreciate help. I have tried to adapt the codes of existing indicators, but I have difficulties. So I prefer to specify what I would like to do:
1. 2SMASlope_Indicator:
Inputs: Fast = length of SMA1 (= 1st Simple Moving Average), Slow = length of SMA2 = 2nd Simple Moving Average)
Output: 2SMASlope_Indicator = 1 (Histogram in Green) if SMA1 > SMA1[1] AND SMA2 > SMA2[1] ; 2SMASlope_Indicator = -1 (Histogram in Red) if SMA1 < SMA1[1] AND SMA2 < SMA2[1]; 2SMASlope_Indicator = 0 in all other cases. [Note: SMA1[1] = SMA1 of previous bar, so SMA1 > SMA1[1] implies Slope(SMA1) > 0 ...]
2. RSI_Histogram:
Input: RSI_Length ; UpLevel ; DnLevel
Output: RSI_Histogram = 1 (Histogram in Green) if RSI > UpLevel ; RSI_Histogram = -1 (Histogram in Red) if RSI < DnLevel ; RSI_Histogram = 0 in all other cases.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Good morning,
as always, the first steps are the most difficult ones, so I appreciate help. I have tried to adapt the codes of existing indicators, but I have difficulties. So I prefer to specify what I would like to do:
1. 2SMASlope_Indicator:
Inputs: Fast = length of SMA1 (= 1st Simple Moving Average), Slow = length of SMA2 = 2nd Simple Moving Average)
Output: 2SMASlope_Indicator = 1 (Histogram in Green) if SMA1 > SMA1[1] AND SMA2 > SMA2[1] ; 2SMASlope_Indicator = -1 (Histogram in Red) if SMA1 < SMA1[1] AND SMA2 < SMA2[1]; 2SMASlope_Indicator = 0 in all other cases. [Note: SMA1[1] = SMA1 of previous bar, so SMA1 > SMA1[1] implies Slope(SMA1) > 0 ...]
2. RSI_Histogram:
Input: RSI_Length ; UpLevel ; DnLevel
Output: RSI_Histogram = 1 (Histogram in Green) if RSI > UpLevel ; RSI_Histogram = -1 (Histogram in Red) if RSI < DnLevel ; RSI_Histogram = 0 in all other cases.
Thank you very much.
Carlo