Description
Puts orange-red and red vertical line on open of Frankfurt and London open, works with tick charts.
Description is too short.
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
namespace cAlgo
{
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class FrankfurtLondon : Indicator
{
// fix for tick charts
int seen_frankfurt = 0;
int seen_london = 0;
protected override void Initialize()
{
}
public override void Calculate(int index)
{
if (MarketSeries.OpenTime[index].Minute == 0) {
if (MarketSeries.OpenTime[index].Hour == 6 && seen_frankfurt != MarketSeries.OpenTime[index].Day) {
seen_frankfurt = MarketSeries.OpenTime[index].Day;
ChartObjects.DrawVerticalLine("Frankfurt Open" + index, index, Colors.OrangeRed, 1);
}
if (MarketSeries.OpenTime[index].Hour == 7 && seen_london != MarketSeries.OpenTime[index].Day) {
seen_london = MarketSeries.OpenTime[index].Day;
ChartObjects.DrawVerticalLine("London Open" + index, index, Colors.Red, 1);
}
}
}
}
}
bosma
Joined on 25.12.2014
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: FrankfurtLondon.algo
- Rating: 0
- Installs: 4394
- 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.
Hi, Thank you for the indicator. I have my charts set as UTC -8 to correspond to Pacific Standard Time and daylight savings. The indicator is showing up as 22:00 to 23:00. It's my understanding that EU is now an hour later or 1:00am pst.
How would I adjust the indicator to reflect the new time.