Category Trend  Published on 27/06/2015

PipsATR

Description

PipsATR is nothing other than the ATR indicator, but its values ​​are expressed in pips rather than value. 
This gives for each timeframe chosen volatility in pips, which in my opinion is more explicit.
On the other hand you can choose the timeframe for which to calculate the volatility; if for example you are 
working on h1, you can see the ATR on h4 or on daily.

Author : Abdallah HACID

Solution Visual studio



//The MIT License (MIT)
//Copyright (c) 2014 abdallah HACID, https://www.facebook.com/ab.hacid

//Permission is hereby granted, free of charge, to any person obtaining a copy of this software
//and associated documentation files (the "Software"), to deal in the Software without restriction,
//including without limitation the rights to use, copy, modify, merge, publish, distribute,
//sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
//is furnished to do so, subject to the following conditions:

//The above copyright notice and this permission notice shall be included in all copies or
//substantial portions of the Software.

//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
//BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
//NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
//DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

// Project Hosting for Open Source Software on Codeplex : https://calgobots.codeplex.com/


// PipsATR is nothing other than the ATR indicator, but its values ​​are expressed in pips rather than value. 
// This gives for each timeframe chosen volatility in pips, which in my opinion is more explicit.
// On the other hand you can choose the timeframe for which to calculate the volatility; if for example you are 
// working on h1, you can see the ATR on h4 or on daily.

using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;

namespace cAlgo.Indicators
{
    [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None, ScalePrecision = 0)]
    [Levels(0, 10, 15, 20, 25, 30, 35, 40, 45, 50,
    55, 60, 70, 80, 90, 100, 200, 300)]
    public class PipsATRIndicator : Indicator
    {
        #region Indicator parameters
        [Parameter("Atr TimeFrame")]
        public TimeFrame AtrTimeFrame { get; set; }

        [Parameter("ATR Period", DefaultValue = 20)]
        public int AtrPeriod { get; set; }

        [Parameter("ATR MAType")]
        public MovingAverageType AtrMaType { get; set; }

        [Output("Pips ATR", Color = Colors.SteelBlue)]
        public IndicatorDataSeries Result { get; set; }
        #endregion

        private AverageTrueRange atr;

        protected override void Initialize()
        {
            atr = Indicators.AverageTrueRange(MarketData.GetSeries(AtrTimeFrame), AtrPeriod, AtrMaType);
        }

        public override void Calculate(int index)
        {
            Result[index] = atr.Result[index] / Symbol.PipSize;
        }
    }
}


AY
aysos75

Joined on 28.09.2013

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: PipsATRIndicator.algo
  • Rating: 0
  • Installs: 6841
  • Modified: 13/10/2021 09:54
Comments
Log in to add a comment.
ML
mldcjsuhc · 2 years ago

Some of the time it's more subtle, similar to when you make a strange buy on your charge card and don't get a misrepresentation alert from your bank. Simulated intelligence is Allread AI EN all over, and it's having a gigantic effect in our lives consistently.

GD
gdcuartasz · 3 years ago

Hello,

Is this cbot working properly now?

 

Thank you

jani's avatar
jani · 5 years ago

This solution is no longer working.

 

File is not there anymore

RV
RV13 · 10 years ago

Found a solution to calgo.lib.dll problem.

1. Go here: https://calgobots.codeplex.com/#
2. Download the zip and extract
3. Click "Manage references" next to build button in cAlgo
4. Click Libaries and then "browse"
5. Browse to extract zip\Build-.....\Solution-calgobots-.....\API  where "....." is some build number
6. Untick missing "f:" dll and re-try build.

RV
RV13 · 10 years ago

I too get

Error CS0006: Metadata file 'f:\dev\calgo\sources\library\calgolib\bin\debug\calgo.lib.dll' could not be found

And the download link at

http://sendbox.fr/pro/7oyl6oe909m8/MQ4.zip.html

Is broke...