RSI with MomentumOscillator
RSI with MomentumOscillator
11 Jan 2018, 22:16
Hello
colud you pleas help me to show rsi with momentum in one windows like pic attached
thanks
Replies
oneplusoc
12 Jan 2018, 08:48
RE:
amsman said:
Normally you can open the RSI Indicator, then open the Momentum Osc., select the Source, change it from close to the RSI and both indicators will appear as above.
They are both "Bound" Indicators (both oscillate between fixed values) so I don't think its possible with these two...but I could be wrong...
THANKS
but this way not working with 2 indicators
thanks
@oneplusoc
PanagiotisCharalampous
12 Jan 2018, 11:59
Hi oneplusoc,
The solution is to create a custom indicator that combines the two indicators together. See a relevant discussion here.
Best Regards,
Panagiotis
@PanagiotisCharalampous
oneplusoc
12 Jan 2018, 12:27
RE:
Panagiotis Charalampous said:
Hi oneplusoc,
The solution is to create a custom indicator that combines the two indicators together. See a relevant discussion here.
Best Regards,
Panagiotis
Thanks i will try and back to you
@oneplusoc
oneplusoc
12 Jan 2018, 15:13
Hello Sir .
colud you pleas check whtat is this Error CS0102: The type 'cAlgo.NewIndicator' already contains a definition for 'Result'
thanks
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
namespace cAlgo
{
[Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class NewIndicator : Indicator
{
[Parameter(DefaultValue = 0.0)]
public double Parameter { get; set; }
[Output("RSI", Color = Colors.Blue)]
public IndicatorDataSeries Result { get; set; }
[Output("Momentum", Color = Colors.Green)]
public IndicatorDataSeries Result { get; set; }
private RelativeStrengthIndex _rsi;
private MomentumOscillator _momentum;
protected override void Initialize()
{
_rsi = Indicators.RelativeStrengthIndex(MarketSeries.Closse, 14);
_momentum = Indicators.MomentumOscillator(MarketSeries.Close, 14);
}
public override void Calculate(int index)
{
Result[index] = _rsi.Result[index];
Result[index] = _momentum.Result[index];
}
}
}
@oneplusoc
PanagiotisCharalampous
12 Jan 2018, 16:44
Dear oneplusoc,
See a corrected version below
using System; using cAlgo.API; using cAlgo.API.Internals; using cAlgo.API.Indicators; using cAlgo.Indicators; namespace cAlgo { [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class NewIndicator : Indicator { [Parameter(DefaultValue = 0.0)] public double Parameter { get; set; } [Output("RSI", Color = Colors.Blue)] public IndicatorDataSeries RSI { get; set; } [Output("Momentum", Color = Colors.Green)] public IndicatorDataSeries Momentum { get; set; } private RelativeStrengthIndex _rsi; private MomentumOscillator _momentum; protected override void Initialize() { _rsi = Indicators.RelativeStrengthIndex(MarketSeries.Close, 14); _momentum = Indicators.MomentumOscillator(MarketSeries.Close, 14); } public override void Calculate(int index) { RSI[index] = _rsi.Result[index]; Momentum[index] = _momentum.Result[index]; } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
oneplusoc
12 Jan 2018, 17:02
( Updated at: 21 Dec 2023, 09:20 )
RE:
Panagiotis Charalampous said:
Dear oneplusoc,
See a corrected version below
using System; using cAlgo.API; using cAlgo.API.Internals; using cAlgo.API.Indicators; using cAlgo.Indicators; namespace cAlgo { [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class NewIndicator : Indicator { [Parameter(DefaultValue = 0.0)] public double Parameter { get; set; } [Output("RSI", Color = Colors.Blue)] public IndicatorDataSeries RSI { get; set; } [Output("Momentum", Color = Colors.Green)] public IndicatorDataSeries Momentum { get; set; } private RelativeStrengthIndex _rsi; private MomentumOscillator _momentum; protected override void Initialize() { _rsi = Indicators.RelativeStrengthIndex(MarketSeries.Close, 14); _momentum = Indicators.MomentumOscillator(MarketSeries.Close, 14); } public override void Calculate(int index) { RSI[index] = _rsi.Result[index]; Momentum[index] = _momentum.Result[index]; } } }Best Regards,
Panagiotis
Thank you for the update now working but have problem with momentum line not smooth as you can see attached pic
thanks
@oneplusoc
PanagiotisCharalampous
12 Jan 2018, 17:16
Hi oneplusoc,
This happens because of the scale of the chart. If you want to combine the two indicators, you will have this problem. Momentum oscillator usually oscillates around 100.
Best Regards,
Panagiotis
@PanagiotisCharalampous
oneplusoc
12 Jan 2018, 17:24
RE:
Panagiotis Charalampous said:
Hi oneplusoc,
This happens because of the scale of the chart. If you want to combine the two indicators, you will have this problem. Momentum oscillator usually oscillates around 100.
Best Regards,
Panagiotis
Noted Appreciation
@oneplusoc
amsman
13 Jan 2018, 03:33
I have incorporated many cTrader Indicators but "Bound" Indicators (oscillating between fixed values) such as these are not possible with the simple API unfortunately.
A possible workaround is to add an MA Indicator (same method) into the RSI and set the MA to behave as close as possible to the Mom. Indicator.
@amsman
rasheduzzamanhridoy68
14 Jan 2018, 10:08
Hi,
I am new for this forum & thanks for your post
@rasheduzzamanhridoy68
oneplusoc
14 Jan 2018, 15:35
RE:
amsman said:
I have incorporated many cTrader Indicators but "Bound" Indicators (oscillating between fixed values) such as these are not possible with the simple API unfortunately.
A possible workaround is to add an MA Indicator (same method) into the RSI and set the MA to behave as close as possible to the Mom. Indicator.
Thanks i alwes use 233 w moving average with any kind of Oscillator
thanks
@oneplusoc
oneplusoc
14 Jan 2018, 15:36
RE:
rasheduzzamanhridoy68 said:
Hi,
I am new for this forum & thanks for your post
you are wellcom
@oneplusoc
amsman
12 Jan 2018, 08:39
Normally you can open the RSI Indicator, then open the Momentum Osc., select the Source, change it from close to the RSI and both indicators will appear as above.
They are both "Bound" Indicators (both oscillate between fixed values) so I don't think its possible with these two...but I could be wrong...
@amsman