Topics
Replies
oneplusoc
24 Apr 2016, 20:36
( Updated at: 21 Dec 2023, 09:20 )
RE:
Thank you for your reply
i have many indicator making scanner but working on mt4 but i cant comvert it .
galafrin said:
I didn't hear about publicly available market scanner but it is no big deal to code as it needs only a list of symbol to be filled as there is not yet built-in one.Here is a screen shot of a market scanner that displays highest HL by asset class::
@oneplusoc
oneplusoc
22 Apr 2016, 06:12
Dear all
how i can draw the value only of the rsi on the chart for multi time frame
for this indicator ?
using System;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
namespace cAlgo.Indicators
{
[Levels(30, 70, 80, 20)]
[Indicator(IsOverlay = false, TimeZone = TimeZones.UTC)]
public class MultiSymbolMA : Indicator
{
private RelativeStrengthIndex ma1, ma2, ma3, ma4;
private MarketSeries series1, series2, series3, series4;
private Symbol symbol1, symbol2, symbol3, symbol4;
[Parameter(DefaultValue = "USDCAD")]
public string Symbol1 { get; set; }
[Parameter(DefaultValue = "EURAUD")]
public string Symbol2 { get; set; }
[Parameter(DefaultValue = "EURJPY")]
public string Symbol3 { get; set; }
[Parameter(DefaultValue = "GBPUSD")]
public string Symbol4 { get; set; }
[Parameter(DefaultValue = 5)]
public int Period { get; set; }
[Output("MA Symbol 1", Color = Colors.Red, PlotType = PlotType.Line, Thickness = 1)]
public IndicatorDataSeries Result1 { get; set; }
[Output("MA Symbol 2", Color = Colors.Magenta, PlotType = PlotType.Line, Thickness = 1)]
public IndicatorDataSeries Result2 { get; set; }
[Output("MA Symbol 3", Color = Colors.Yellow, PlotType = PlotType.Line, Thickness = 1)]
public IndicatorDataSeries Result3 { get; set; }
[Output("MA Symbol 4", Color = Colors.White, PlotType = PlotType.Line, Thickness = 1, LineStyle = LineStyle.Dots)]
public IndicatorDataSeries Result4 { get; set; }
protected override void Initialize()
{
symbol1 = MarketData.GetSymbol(Symbol1);
symbol2 = MarketData.GetSymbol(Symbol2);
symbol3 = MarketData.GetSymbol(Symbol3);
symbol4 = MarketData.GetSymbol(Symbol4);
series1 = MarketData.GetSeries(symbol1, TimeFrame);
series2 = MarketData.GetSeries(symbol2, TimeFrame);
series3 = MarketData.GetSeries(symbol3, TimeFrame);
series4 = MarketData.GetSeries(symbol4, TimeFrame);
ma1 = Indicators.RelativeStrengthIndex(series1.Close, Period);
ma2 = Indicators.RelativeStrengthIndex(series2.Close, Period);
ma3 = Indicators.RelativeStrengthIndex(series3.Close, Period);
ma4 = Indicators.RelativeStrengthIndex(series4.Close, Period);
}
public override void Calculate(int index)
{
ShowOutput(symbol1, Result1, ma1, series1, index);
ShowOutput(symbol2, Result2, ma2, series2, index);
ShowOutput(symbol3, Result3, ma3, series3, index);
ShowOutput(symbol4, Result4, ma4, series4, index);
}
private void ShowOutput(Symbol symbol, IndicatorDataSeries result, RelativeStrengthIndex RelativeStrengthIndex, MarketSeries series, int index)
{
int index2 = GetIndexByDate(series, MarketSeries.OpenTime[index]);
result[index] = RelativeStrengthIndex.Result[index2];
string text = string.Format("{0} {1}", symbol.Code, Math.Round(result[index], 0));
ChartObjects.DrawText(symbol.Code, text, index + 1, result[index], VerticalAlignment.Center, HorizontalAlignment.Right, Colors.Yellow);
}
private int GetIndexByDate(MarketSeries series, DateTime time)
{
for (int i = series.Close.Count - 1; i >= 0; i--)
if (time == series.OpenTime[i])
return i;
return -1;
}
}
}
@oneplusoc
oneplusoc
26 Apr 2016, 16:57
RE:
yed i do but not working right and same of them ex4 file not allowed to convert from this site ,so i useing mt4 to get signal and make order from ctrader
nb> if you make convert code from mt4 to calgo and open meany chart with this indicators make ctrader very slow when this indicators have alert so iam asking for calgo code
galafrin said:
@oneplusoc