Description
Using this indicator, you can use four KijunSen at the same time
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
namespace cAlgo{
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class Multi_KijunSen : Indicator{
[Parameter("SenkoSpanB", DefaultValue = 0)]
public int SenkoB{ get; set; }
[Parameter("TenkanSen", DefaultValue = 0)]
public int TenkanSen{ get; set; }
[Parameter("Period_1", DefaultValue = 9)]
public int KJPeriods_1{ get; set; }
[Parameter("Period_2", DefaultValue = 26)]
public int KJPeriods_2{ get; set; }
[Parameter("Period_3", DefaultValue = 52)]
public int KJPeriods_3{ get; set; }
[Parameter("Period_4", DefaultValue = 234)]
public int KJPeriods_4{ get; set; }
[Output("Kijunsen_1", Color = Colors.Red)]
public IndicatorDataSeries KijunSen_1 { get; set; }
[Output("Kijunsen_2", Color = Colors.Blue)]
public IndicatorDataSeries KijunSen_2 { get; set; }
[Output("Kijunsen_3", Color = Colors.Yellow)]
public IndicatorDataSeries KijunSen_3 { get; set; }
[Output("Kijunsen_4", Color = Colors.Green)]
public IndicatorDataSeries KijunSen_4 { get; set; }
private IchimokuKinkoHyo KJ1;
private IchimokuKinkoHyo KJ2;
private IchimokuKinkoHyo KJ3;
private IchimokuKinkoHyo KJ4;
protected override void Initialize(){
KJ1 = Indicators.IchimokuKinkoHyo(TenkanSen, KJPeriods_1, SenkoB);
KJ2 = Indicators.IchimokuKinkoHyo(TenkanSen, KJPeriods_2, SenkoB);
KJ3 = Indicators.IchimokuKinkoHyo(TenkanSen, KJPeriods_3, SenkoB);
KJ4 = Indicators.IchimokuKinkoHyo(TenkanSen, KJPeriods_4, SenkoB);
}
public override void Calculate(int index){
KijunSen_1[index] = KJ1.KijunSen[index];
KijunSen_2[index] = KJ2.KijunSen[index];
KijunSen_3[index] = KJ3.KijunSen[index];
KijunSen_4[index] = KJ4.KijunSen[index];
}
}
}
MR
MrDeveloper
Joined on 30.09.2022
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: Mutli_KijunS.algo
- Rating: 0
- Installs: 784
- Modified: 30/09/2022 11:13
Note that publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section, please use the Copyright Infringement Notification form to submit a claim.
Comments
Log in to add a comment.
The area where Kijunen 9, 26 and 52 intersect Kijunsen 234 upwards or downwards can be an area to change the direction of the trend in the future.