Category Other  Published on 18/05/2022

Last week High Low Layout

Description

This indy creates a Layout of the high and low of last week.

It will useful to see support and resistance weekly.

some users use in Market maker method too.

XAUUSD M15

 


// -------------------------------------------------------------------------------------------------
//
//    ADR - Average Daily Range
//
// -------------------------------------------------------------------------------------------------

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

namespace cAlgo.Indicators
{
    [Indicator(IsOverlay = true, AccessRights = AccessRights.None)]
    public class LastweekHighLow : Indicator
    {
        private Bars mseries2;
        private Bars mseries_wk;
        private int _TimeframeIndex;
        [Output("layout_wkH", LineColor = "Gray", Thickness = 1, LineStyle = LineStyle.Dots)]
        public IndicatorDataSeries layout_wkH { get; set; }
        [Output("layout_wkL", LineColor = "Gray", Thickness = 1, LineStyle = LineStyle.Dots)]
        public IndicatorDataSeries layout_wkL { get; set; }
        protected override void Initialize()
        {
            mseries2 = MarketData.GetBars(TimeFrame);
            mseries_wk = MarketData.GetBars(TimeFrame.Weekly);
        }

        public override void Calculate(int index)
        {
            _TimeframeIndex = mseries_wk.OpenTimes.GetIndexByTime(mseries2.OpenTimes[index]);
            layout_wkH[index] = mseries_wk.HighPrices[_TimeframeIndex - 1];
            layout_wkL[index] = mseries_wk.LowPrices[_TimeframeIndex - 1];

        }
    }
}



GO
goldclay

Joined on 27.05.2017

  • Distribution: Paid
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: LastweekHighLow.algo
  • Rating: 5
  • Installs: 660
Comments
Log in to add a comment.
CO
costasancho123 · 2 years ago

A lot of people are looking for ways to entertain themselves. With the rise in technology, it is easier than ever to find something to keep you occupied and entertained. One such way is with the Media Box HD app.