Information
Username: | jedimaster |
Member since: | 17 May 2018 |
Last login: | 17 May 2018 |
Status: | Active |
Activity
Where | Created | Comments |
---|---|---|
Algorithms | 0 | 18 |
Forum Topics | 1 | 0 |
Jobs | 0 | 0 |
Last Algorithm Comments
I just notice your information. I'll try out this week Thanks
Very interesting approach, thanks for sharing. The difficult part now is to find out the right setting for each of the various inputs for a specific TF.
I was trying to open the db file with DB Browser for SQL Lite without success. It works fine with LiteDBViewer.
Great job!
Dear Ahmad,
Years ago the following indicator https://ctrader.com/algos/indicators/show/67 was providing a pop-up alert system based on a different library. One of the key features is to write down all alerts in a CSV file. Even after you delete the alert in the list, the CSV file will keep all records. It'll be a great improvement to add that feature together with a silent mode ( no show up). That will enable us to backtest the alert rules in order to get better quality and accuracy of alerts. Thanks
I finally got the change, the new one is:
Notifications.ShowPopup(MarketSeries.TimeFrame, Symbol, tradeType, "AlertTest Indicator", Symbol.Bid, "No comment", Server.Time);
Dear Ahmad
In the wiki the example is:
Notifications.ShowPopup(MarketSeries.TimeFrame, Symbol, Symbol.Bid, "AlertTest Indicator", tradeType, "No comment", Server.Time);
In the new Alert model TimeFrame = timeFrame,
Symbol = symbol,
Price = price,
TriggeredBy = triggeredBy,
Type = type,
Comment = comment,
Time = time
In the sample indicator "Alert test indicator" is the triggeredBy (argument 4) and "no comment" is comment (argument 6), where is the ordering change ?
If you can provide a new command line to replace the previous it will better clarify
Thanks.
Hi Ahmad, I am testing the latest GNU package (2.1.2) with your Alert tester sample indicator and I cannot compile because the following arguments 4 and 6 are double " Error CS1928: '
Code is your Alert tester:
if (_barIndex != index && IsLastBar) { _barIndex = index; TradeType tradeType = MarketSeries.Close[index - 1] > MarketSeries.Open[index - 1] ? TradeType.Buy : TradeType.Sell; Notifications.ShowPopup(MarketSeries.TimeFrame, Symbol, Symbol.Bid, "AlertTest Indicator", tradeType, "No comment", Server.Time); }
I get the following errors:
cAlgo.API.Internals.INotifications' does not contain a definition for 'ShowPopup' and the best extension method overload 'cAlgo.API.Alert.INotificationsExtensions.ShowPopup(cAlgo.API.Internals.INotifications, cAlgo.API.TimeFrame, cAlgo.API.Internals.Symbol, cAlgo.API.TradeType, string, double, string, System.DateTimeOffset)' has some invalid arguments" "
Error CS1503 Argument 4: cannot convert from 'double' to 'cAlgo.API.TradeType' Alert tester
Error Argument 6: cannot convert from 'cAlgo.API.TradeType' to 'double' Alert tester
Can you help me out?
Can you explain where is the download button on your Italian website?. Indicator can be added to the wishlist but then from the wishlist, you return to the product description page.
A simple but useful indicator that can be combined with timing. For commodities, it' ll be useful to be able to select the MA type. Thanks
I am sorry not being able to join as I am living in a country where both Instagram and Telegram aren't allowed to be accessed. Can you provide with an example the ADR indicator as that indicator is necessary ?
BTMM is caling the ADR, Average Daily Range indicator. There is a "myADR indicator" but it seems a different one. Can your provide the ADR indicator to make it work properly? Thanks
Using default settings on M15 or M30, I have the High Low lines but none of the "Brinks" zones in green or red opacity.
In the first place, I was very impressed by the implementation of the Belkhayate in the signal indicator you provided. The GUI is giving a very helpful assistance during the stressfull trading hours. I am following him for several years and I believe you have done something quite unique. As I am mainly trading very volatile commodities, trend magic based on CCI was something I definitely want to look into details. I think it can replace both Supertrend and/or ATR trailer as it shares the methodology but it's instead based on CCI rather than the data series itself. I just added minor options to help me with super volatile commodities and also in a way to bridge Trend Magic with those two previous indicators. I am using the normalized version of the ATR.but aside that modification the default values won't change the original version behavior.
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 TrendMagicVL : Indicator
{
[Parameter("CCI Period", DefaultValue = 20)]
public int cciPer { get; set; }
[Parameter("MA Method", DefaultValue = MovingAverageType.Simple)]
public MovingAverageType MaType { get; set; }
[Parameter("ATR Period", DefaultValue = 5)]
public int atrPer { get; set; }
[Parameter("ATR Factor", DefaultValue = 1, MinValue = 0.1, MaxValue = 4.0)]
public double Factor { get; set; }
[Parameter("ATR Multiplier", DefaultValue = 1.0)]
public double atrMul { get; set; }
[Output("Trend Magic", LineColor = "Yellow")]
public IndicatorDataSeries TM { get; set; }
[Output("Trend Magic Up", PlotType = PlotType.DiscontinuousLine, LineColor = "Lime", Thickness = 2)]
public IndicatorDataSeries TMUp { get; set; }
[Output("Trend Magic Down", PlotType = PlotType.DiscontinuousLine, LineColor = "Red", Thickness = 2)]
public IndicatorDataSeries TMDown { get; set; }
private CommodityChannelIndex cci;
private AverageTrueRange atr;
private IndicatorDataSeries bufferUp, bufferDown, x, swap;
protected override void Initialize()
{
cci = Indicators.CommodityChannelIndex(cciPer);
atr = Indicators.AverageTrueRange(atrPer, MaType);
bufferDown = CreateDataSeries();
bufferUp = CreateDataSeries();
x = CreateDataSeries();
swap = CreateDataSeries();
}
public override void Calculate(int index)
{
bufferDown[index] = MarketSeries.High[index] + Factor * (atrMul * (100 * atr.Result[index] / MarketSeries.Close[index]));
bufferUp[index] = MarketSeries.Low[index] - Factor * (atrMul * (100 * atr.Result[index] / MarketSeries.Close[index]));
if (cci.Result[index] >= 0 && cci.Result[index - 1] < 0)
{
bufferUp[index] = bufferDown[index - 1];
}
if (cci.Result[index] <= 0 && cci.Result[index - 1] > 0)
{
bufferDown[index] = bufferUp[index - 1];
}
if (cci.Result[index] >= 0 && bufferUp[index] < bufferUp[index - 1])
bufferUp[index] = bufferUp[index - 1];
else if (cci.Result[index] <= 0 && bufferDown[index] > bufferDown[index - 1])
bufferDown[index] = bufferDown[index - 1];
x[index] = cci.Result[index] >= 0 ? bufferUp[index] : cci.Result[index] < 0 ? bufferDown[index] : x[index - 1];
swap[index] = x[index] > x[index - 1] ? 1 : x[index] < x[index - 1] ? -1 : swap[index - 1];
TM[index] = x[index];
if (swap[index] == 1)
{
TMUp[index] = x[index];
TMDown[index] = double.NaN;
}
if (swap[index] == -1)
{
TMDown[index] = x[index];
TMUp[index] = double.NaN;
}
}
}
}
That linear weighted MA created 3 years ago is now a standard type of moving average, the weighted MA. As mentioned the indicator is using the next to come candle to confirm the trend change so the chart will be repainted.
There is a kind of myth, a kind of Graal search of the "ultimate" indicator able to read the market whatever the market state or the instrument you're trading. Averaging is a way to have a more robust approach in these different conditions. I suggest adding a signal moving average (Period and MaType) on the average result to visualize, breakout or retracement in addition to the existing OB, OS and pivot levels.