Description
hi
with this indicator you can shift ichimoku forward or backward
you can shift all part of ichimoku or just shift one part
you can contact me in instagram : bourse_blinders
for iranian users :
lotfan page mano to telegram donbal konid :
telegram : @bourseblinders
/*
==================================================================================
==================================================================================
ichimoku shift
Copyright © 2020, amincch
Developer: amincch
Telegram: @bourseblinders
==================================================================================
==================================================================================
with this indicator you can shift ichimoku forward or backward
*/
using System;
using cAlgo.API;
using cAlgo.API.Indicators;
namespace cAlgo.Indicators
{
[Indicator(IsOverlay = true, AccessRights = AccessRights.None)]
public class ichimokushift : Indicator
{
[Parameter(DefaultValue = 9)]
public int periodFast { get; set; }
[Parameter(DefaultValue = 26)]
public int periodMedium { get; set; }
[Parameter(DefaultValue = 52)]
public int periodSlow { get; set; }
[Parameter(DefaultValue = 26)]
public int DisplacementChikou { get; set; }
[Parameter(DefaultValue = 26)]
public int DisplacementCloud { get; set; }
[Parameter(DefaultValue = 26, MinValue = -100, MaxValue = 500)]
public int Shift { get; set; }
[Output("TenkanSen", Color = Colors.Red)]
public IndicatorDataSeries TenkanSen { get; set; }
[Output("Kijunsen", Color = Colors.Blue)]
public IndicatorDataSeries KijunSen { get; set; }
[Output("ChikouSpan", Color = Colors.DarkViolet)]
public IndicatorDataSeries ChikouSpan { get; set; }
[Output("SenkouSpanB", Color = Colors.Red, LineStyle = LineStyle.Lines)]
public IndicatorDataSeries SenkouSpanB { get; set; }
[Output("SenkouSpanA", Color = Colors.Green, LineStyle = LineStyle.Lines)]
public IndicatorDataSeries SenkouSpanA { get; set; }
double maxfast, minfast, maxmedium, minmedium, maxslow, minslow;
public override void Calculate(int index)
{
if ((index < periodFast) || (index < periodSlow))
{
return;
}
maxfast = MarketSeries.High[index];
minfast = MarketSeries.Low[index];
maxmedium = MarketSeries.High[index];
minmedium = MarketSeries.Low[index];
maxslow = MarketSeries.High[index];
minslow = MarketSeries.Low[index];
for (int i = 0; i < periodFast; i++)
{
if (maxfast < MarketSeries.High[index - i])
{
maxfast = MarketSeries.High[index - i];
}
if (minfast > MarketSeries.Low[index - i])
{
minfast = MarketSeries.Low[index - i];
}
}
for (int i = 0; i < periodMedium; i++)
{
if (maxmedium < MarketSeries.High[index - i])
{
maxmedium = MarketSeries.High[index - i];
}
if (minmedium > MarketSeries.Low[index - i])
{
minmedium = MarketSeries.Low[index - i];
}
}
for (int i = 0; i < periodSlow; i++)
{
if (maxslow < MarketSeries.High[index - i])
{
maxslow = MarketSeries.High[index - i];
}
if (minslow > MarketSeries.Low[index - i])
{
minslow = MarketSeries.Low[index - i];
}
}
TenkanSen[index + Shift] = ((maxfast + minfast) / 2);
KijunSen[index + Shift] = ((maxmedium + minmedium) / 2);
ChikouSpan[index - DisplacementChikou + Shift] = MarketSeries.Close[index];
SenkouSpanA[index + DisplacementCloud + Shift] = ((TenkanSen[index] + KijunSen[index]) / 2);
SenkouSpanB[index + DisplacementCloud + Shift] = ((maxslow + minslow) / 2);
}
}
}
CT
ctid2236769
Joined on 24.06.2020
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: ichimoku shift.algo
- Rating: 5
- Installs: 1957
- Modified: 13/10/2021 09:54
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.
No comments found.