Description
Hello
Another nice indicator, I hope you like it. I would like to dedicate this indicator to Mister George Soros for his kind words for Spain, the country in which I reside, in a recent newspaper article.
Don't forget to do charity to the poor if succes please
It is the price of the indicator
(This indicator does a lot of calculations, especially with long periods, and probably, older PC's, will need an internal ssd disk, not SATA, M.2 or faster)
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 SmoothedHighAndLowOverlayBands : Indicator
{
[Parameter("Periods", DefaultValue = 20)]
public int Periods { get; set; }
[Output("Result1", LineColor = "DimGray")]
public IndicatorDataSeries Result1 { get; set; }
[Output("Result2", LineColor = "DimGray")]
public IndicatorDataSeries Result2 { get; set; }
[Output("Result3", LineColor = "DimGray")]
public IndicatorDataSeries Result3 { get; set; }
[Output("Result4", LineColor = "DimGray")]
public IndicatorDataSeries Result4 { get; set; }
[Output("Result5", LineColor = "Red")]
public IndicatorDataSeries Result5 { get; set; }
[Output("Result6", LineColor = "Green")]
public IndicatorDataSeries Result6 { get; set; }
private IndicatorDataSeries max, min;
private double hmax, lmax;
private double hmin, lmin;
protected override void Initialize()
{
max = CreateDataSeries();
min = CreateDataSeries();
}
public override void Calculate(int index)
{
max[index] = 0;
min[index] = 0;
for (int i = 1; i <= Periods; i++)
{
max[index] += Bars.HighPrices.Maximum(i);
min[index] += Bars.LowPrices.Minimum(i);
}
max[index] = max[index] / Periods;
min[index] = min[index] / Periods;
hmax = 0;
lmax = 0;
hmin = 0;
lmin = 0;
for (int i = 1; i <= Periods; i++)
{
hmax += max.Maximum(i);
lmax += max.Minimum(i);
hmin += min.Maximum(i);
lmin += min.Minimum(i);
}
hmax = hmax / Periods;
lmax = lmax / Periods;
hmin = hmin / Periods;
lmin = lmin / Periods;
Result1[index] = hmax;
Result2[index] = lmax;
Result3[index] = hmin;
Result4[index] = lmin;
Result5[index] = max[index];
Result6[index] = min[index];
}
}
}
srm_bcn
Joined on 01.09.2019
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: SmoothedHighAndLowOverlayBands.algo
- Rating: 0
- Installs: 1265
- Modified: 13/10/2021 09:54
Comments
In my spare time I read Sun Tzu's Art of War.
Wait for the opponent up high and fight back when he arrives tired while you are rested waiting.
In short, in my operations I try to enter the correction of excesses, both up and down. The probability of success increases with ranging markets and decreases with trending markets.
If you look, you can see with my MeanReversionOverlay indicator, for example, that after a long period of trend, markets tend to range.
I hope I have helped you although it involves many hours of observation and small tests with microlots.
Hello, this indicator is based on the fact that the weighted average of the close maximums and also the close minimums can be split in two bands of highs and lows, with the same period in the example.
I think this indicator can be used to take a look of the trend and to find swing points.
I always look for possible swing points or support and resistance levels, with my indicators, following a mean reversion logic.
I always look for small profits, a few cents, but high frequency too. I don't like to follow trends.
They say that the trend is your friend but I am divorced xD Just kidding.
This indicator is another step in my search for the perfect indicator if it exists. I hope it helps to analyze the market and find entry and exit points.
No indicator can cancel the risk. Thanks for your question. Have luck.
Hi looks cool. How do I use it? What do I look for?
Thanks
This book is old but has very interesting ideas. For example: "The supreme art consists of winning the adversary without fighting."
I relate it to do long-term analysis and to have two accounts, in each currency of your favorite pair, you can earn simply by changing account funds, without a single trade!
Every idea in the book can be related to trading and mony management.
I can't go on any longer because that's what trading schools are for, sorry.