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.
// -------------------------------------------------------------------------------------------------
//
// 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
- Modified: 18/05/2022 07:36
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.
CO
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.
How to get this indicator? where to pay?