Description
Simple Average True Range
But in pips
v1 : code fix as stated by @emil.kupco
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 ATRPIPv1 : Indicator
{
//
[Parameter("MA Type")]
public MovingAverageType matype { get; set; }
[Parameter("Period", DefaultValue = 20)]
public int atrper { get; set; }
[Output("atrpips")]
public IndicatorDataSeries Result { get; set; }
AverageTrueRange atr;
protected override void Initialize()
{
atr = Indicators.AverageTrueRange(atrper, matype);
}
public override void Calculate(int index)
{
Result[index] = atr.Result[index] / Symbol.PipSize;
}
}
}
fundspreader
Joined on 30.01.2017
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: ATR PIP v1.algo
- Rating: 0
- Installs: 2878
- Modified: 13/02/2022 14:37
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.
EM
You should probably check your code more carefully before releasing it. It is simple to fix but not everybody can probably do it ( see "matype" and "emaatr")
XE
Hello,
Very interesting indicator, could you please contact me on Telegram (username: xeulav).
Thanks a lot!
Thank you for mentioning it