Renko Bar Colour Change Indicator with Alert
Renko Bar Colour Change Indicator with Alert
13 Nov 2018, 12:35
Hi wondering if anybody can help code an indicator to work with cTrader v3.3 which includes renko bars that will give an alert when bars change colour from red to green and vice versa. I've attatched a screenshot of an indicator available on Tradingview called RenkoMagicAlert as an example.
Any help would be much appreciated
Replies
afhacker
14 Nov 2018, 13:38
Try this: https://drive.google.com/open?id=1jteEpLY-FteEssKfzppcNLPgysEEw5QM
using cAlgo.API; using cAlgo.API.Alert; using cAlgo.API.Internals; namespace cAlgo { [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)] public class BarColorChangeAlert : Indicator { #region Fields private int _lastAlertBarIndex; #endregion Fields #region Methods protected override void Initialize() { cAlgo.API.Alert.Types.Configuration.Tracer = Print; } public override void Calculate(int index) { if (MarketSeries.Close[index] > MarketSeries.Open[index] && MarketSeries.Close[index - 1] < MarketSeries.Open[index - 1]) { TriggerAlert(index, TradeType.Buy); } else if (MarketSeries.Close[index] < MarketSeries.Open[index] && MarketSeries.Close[index - 1] > MarketSeries.Open[index - 1]) { TriggerAlert(index, TradeType.Sell); } } private void TriggerAlert(int index, TradeType tradeType) { if (index == _lastAlertBarIndex || !IsLastBar) { return; } _lastAlertBarIndex = index; string comment = tradeType == TradeType.Buy ? "Bullish Bar" : "Bearish Bar"; Notifications.ShowPopup(TimeFrame, Symbol, MarketSeries.Close[index], "Bar Color Change Alert", tradeType, comment, MarketSeries.OpenTime[index]); } #endregion Methods } }
Whenever a bar color change happens it shows a popup alert.
You can enable sound, email and Telegram alert on pupop settings if you want to.
@afhacker
stevenbernard1007
16 Nov 2018, 11:46
RE:
Hi Ahmad,
I've given your indicator a try, it works great, your a very talented man.
Thank you for replying to me so soon, apologises for my delayed response not managed to get much screentime this week
@stevenbernard1007
stevenbernard1007
16 Nov 2018, 11:49
RE:
ClickAlgo said:
Hi Paul, thanks for responding to my post and offering to help me.
@stevenbernard1007
afhacker
14 Feb 2019, 16:00
RE: RE:
Download the compiled "algo" file from here: https://drive.google.com/open?id=1-pXB4XEJy7Eftom0dha21E379xvuucla
using cAlgo.API; using cAlgo.API.Alert; using cAlgo.API.Internals; namespace cAlgo { [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)] public class NewBarAlert : Indicator { #region Fields private int _lastAlertBarIndex; #endregion Fields #region Overridden Methods protected override void Initialize() { cAlgo.API.Alert.Models.Configuration.Current.Tracer = Print; _lastAlertBarIndex = MarketSeries.Close.Count - 1; } public override void Calculate(int index) { if (!IsLastBar || index == _lastAlertBarIndex) { return; } _lastAlertBarIndex = index; string type = MarketSeries.Close[index] > MarketSeries.Open[index] ? "Bullish Bar" : "Bearish Bar"; Notifications.ShowPopup(TimeFrame, Symbol, type, "New Bar Alert", MarketSeries.Open[index]); } #endregion Overridden Methods } }
@afhacker
matt92
18 Feb 2019, 08:23
RE: RE: RE:
afhacker said:
Download the compiled "algo" file from here: https://drive.google.com/open?id=1-pXB4XEJy7Eftom0dha21E379xvuucla
Thank you very much, I greatly appreciate your efforts! I dont know what is wrong, but the indicator keeps crashing cTrader, I know it works cuz it created a few alert notifications before giving me any issues, i added it to other renko charts, and now i cant even get it to work on one, anytime there is an alert cTrader just crashes. Perhaps you can try it out again maybe longer test period or something, because its simply not working anymore, I tried deleting and redownloading, but that has not worked.. :( sigh, back to staring at the screen lol
@matt92
matt92
18 Feb 2019, 08:40
RE: RE: RE: RE:
matt_graham_92@hotmail.com said:
afhacker said:
Download the compiled "algo" file from here: https://drive.google.com/open?id=1-pXB4XEJy7Eftom0dha21E379xvuucla
https://gyazo.com/347784a6ec02cb92f3dc7c560815f085 It also gives details here, unfortunately the info is in a small box that i can not make bigger by default. So I would have to send like 4 screen shots, and it would just be a mess to read.. here would be the first one.. https://gyazo.com/119cc47637e33437f48c95ab72fc26e6 2nd: https://gyazo.com/aef035e36755dc2ea41b8b95d6813029 3rd: https://gyazo.com/3697a3921f71e3e6cdc7c41dac0f8f06 4th: https://gyazo.com/e5f795ce4f388524af8f5dd140146d52 5th! https://gyazo.com/bda17a199b63ca89d490ffe80ed331ec
@matt92
afhacker
18 Feb 2019, 09:24
RE: RE: RE: RE: RE:
matt_graham_92@hotmail.com said:
matt_graham_92@hotmail.com said:
afhacker said:
Download the compiled "algo" file from here: https://drive.google.com/open?id=1-pXB4XEJy7Eftom0dha21E379xvuucla
https://gyazo.com/347784a6ec02cb92f3dc7c560815f085 It also gives details here, unfortunately the info is in a small box that i can not make bigger by default. So I would have to send like 4 screen shots, and it would just be a mess to read.. here would be the first one.. https://gyazo.com/119cc47637e33437f48c95ab72fc26e6 2nd: https://gyazo.com/aef035e36755dc2ea41b8b95d6813029 3rd: https://gyazo.com/3697a3921f71e3e6cdc7c41dac0f8f06 4th: https://gyazo.com/e5f795ce4f388524af8f5dd140146d52 5th! https://gyazo.com/bda17a199b63ca89d490ffe80ed331ec
You can copy the exception detail and post it here, anyway it looks like there is an issue with your selected sound file path for the sound alert.
You can reset the indicator to its first state by deleting its settings file which is located here:
%userprofile%\Documents\cAlgo
Delete the file "AlertPopupSettings_2.0.1.4.xml" and "Alerts_2.0.1.4.db", then test the indicator.
@afhacker
matt92
18 Feb 2019, 10:31
RE: RE: RE: RE: RE: RE:
afhacker said:
matt_graham_92@hotmail.com said:
matt_graham_92@hotmail.com said:
afhacker said:
Download the compiled "algo" file from here: https://drive.google.com/open?id=1-pXB4XEJy7Eftom0dha21E379xvuucla
https://gyazo.com/347784a6ec02cb92f3dc7c560815f085 It also gives details here, unfortunately the info is in a small box that i can not make bigger by default. So I would have to send like 4 screen shots, and it would just be a mess to read.. here would be the first one.. https://gyazo.com/119cc47637e33437f48c95ab72fc26e6 2nd: https://gyazo.com/aef035e36755dc2ea41b8b95d6813029 3rd: https://gyazo.com/3697a3921f71e3e6cdc7c41dac0f8f06 4th: https://gyazo.com/e5f795ce4f388524af8f5dd140146d52 5th! https://gyazo.com/bda17a199b63ca89d490ffe80ed331ec
You can copy the exception detail and post it here, anyway it looks like there is an issue with your selected sound file path for the sound alert.
You can reset the indicator to its first state by deleting its settings file which is located here:
%userprofile%\Documents\cAlgo
Delete the file "AlertPopupSettings_2.0.1.4.xml" and "Alerts_2.0.1.4.db", then test the indicator.
System.ArgumentException: The path is not of a legal form.
at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.GetFullPathInternal(String path)
at System.Media.SoundPlayer.ResolveUri(String partialUri)
at System.Media.SoundPlayer.SetupSoundLocation(String soundLocation)
at cAlgo.API.Alert.Launcher.PlaySound(String path)
at cAlgo.API.Alert.Launcher.TriggerAlerts(INotifications notifications, SettingsModel settings, AlertModel alert)
at cAlgo.API.Alert.Launcher.<>c__DisplayClass13_0.<Launch>b__0()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
I appreciate the reply! Sry i dont know why i didnt think of that, just goes to show how terrible i am lol. I also dont understand your instructions on how to fix the problem, i tried but i dont know where to find %userprofile%\Documents\cAlgo or where to delete the file "AlertPopupSettings_2.0.1.4.xml" and "Alerts_2.0.1.4.db" from :\
I am able to find the folder of the indicator, but all i can do is add it to my cTrader or delete it. I have just deleted it again for now, trying to get it to work :)
Thanks
@matt92
afhacker
18 Feb 2019, 13:05
RE: RE: RE: RE: RE: RE: RE:
matt_graham_92@hotmail.com said:
afhacker said:
matt_graham_92@hotmail.com said:
matt_graham_92@hotmail.com said:
afhacker said:
Download the compiled "algo" file from here: https://drive.google.com/open?id=1-pXB4XEJy7Eftom0dha21E379xvuucla
https://gyazo.com/347784a6ec02cb92f3dc7c560815f085 It also gives details here, unfortunately the info is in a small box that i can not make bigger by default. So I would have to send like 4 screen shots, and it would just be a mess to read.. here would be the first one.. https://gyazo.com/119cc47637e33437f48c95ab72fc26e6 2nd: https://gyazo.com/aef035e36755dc2ea41b8b95d6813029 3rd: https://gyazo.com/3697a3921f71e3e6cdc7c41dac0f8f06 4th: https://gyazo.com/e5f795ce4f388524af8f5dd140146d52 5th! https://gyazo.com/bda17a199b63ca89d490ffe80ed331ec
You can copy the exception detail and post it here, anyway it looks like there is an issue with your selected sound file path for the sound alert.
You can reset the indicator to its first state by deleting its settings file which is located here:
%userprofile%\Documents\cAlgo
Delete the file "AlertPopupSettings_2.0.1.4.xml" and "Alerts_2.0.1.4.db", then test the indicator.
System.ArgumentException: The path is not of a legal form.
at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.GetFullPathInternal(String path)
at System.Media.SoundPlayer.ResolveUri(String partialUri)
at System.Media.SoundPlayer.SetupSoundLocation(String soundLocation)
at cAlgo.API.Alert.Launcher.PlaySound(String path)
at cAlgo.API.Alert.Launcher.TriggerAlerts(INotifications notifications, SettingsModel settings, AlertModel alert)
at cAlgo.API.Alert.Launcher.<>c__DisplayClass13_0.<Launch>b__0()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
I appreciate the reply! Sry i dont know why i didnt think of that, just goes to show how terrible i am lol. I also dont understand your instructions on how to fix the problem, i tried but i dont know where to find %userprofile%\Documents\cAlgo or where to delete the file "AlertPopupSettings_2.0.1.4.xml" and "Alerts_2.0.1.4.db" from :\
I am able to find the folder of the indicator, but all i can do is add it to my cTrader or delete it. I have just deleted it again for now, trying to get it to work :)
Thanks
Look open Windows Run by pressing Window Button+R, and then type the following command:
%userprofile%\Documents\cAlgo
Click on the "Ok" button and it will open the cAlgo directory, there you will find the "AlertPopupSettings_2.0.1.4.xml" and "Alerts_2.0.1.4.db" files, delete both and test again the indicator.
I was able to replicate your issue, you have enabled the sound notification but not selected any sound file, once you removed the alert settings file the indicator will start to work fine again.
Its a minor bug on alert library and we will release a fix for it, but you should not enable the sound notification if you haven't selected a sound file.
@afhacker
afhacker
19 Feb 2019, 15:45
The new version of bar color change indicator (Alert library updated to the latest version): https://drive.google.com/open?id=1oDOa-IjwXnfidU5zv5IjipcnKgzb4JB5
using cAlgo.API; using cAlgo.API.Alert; using cAlgo.API.Internals; namespace cAlgo { [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)] public class BarColorChangeAlert : Indicator { #region Fields private int _lastAlertBarIndex; #endregion Fields #region Methods protected override void Initialize() { _lastAlertBarIndex = MarketSeries.Close.Count - 1; cAlgo.API.Alert.Models.Configuration.Current.Tracer = Print; } public override void Calculate(int index) { if (MarketSeries.Close[index] > MarketSeries.Open[index] && MarketSeries.Close[index - 1] < MarketSeries.Open[index - 1]) { TriggerAlert(index, "Bullish"); } else if (MarketSeries.Close[index] < MarketSeries.Open[index] && MarketSeries.Close[index - 1] > MarketSeries.Open[index - 1]) { TriggerAlert(index, "Bearish"); } } private void TriggerAlert(int index, string type) { if (index == _lastAlertBarIndex || !IsLastBar) { return; } _lastAlertBarIndex = index; Notifications.ShowPopup(TimeFrame, Symbol, type, "Bar Color Change"); } #endregion Methods } }
@afhacker
matt92
26 Feb 2019, 18:24
RE: RE: RE: RE: RE: RE: RE: RE:
afhacker said:
matt_graham_92@hotmail.com said:
afhacker said:
matt_graham_92@hotmail.com said:
matt_graham_92@hotmail.com said:
afhacker said:
Download the compiled "algo" file from here: https://drive.google.com/open?id=1-pXB4XEJy7Eftom0dha21E379xvuucla
https://gyazo.com/347784a6ec02cb92f3dc7c560815f085 It also gives details here, unfortunately the info is in a small box that i can not make bigger by default. So I would have to send like 4 screen shots, and it would just be a mess to read.. here would be the first one.. https://gyazo.com/119cc47637e33437f48c95ab72fc26e6 2nd: https://gyazo.com/aef035e36755dc2ea41b8b95d6813029 3rd: https://gyazo.com/3697a3921f71e3e6cdc7c41dac0f8f06 4th: https://gyazo.com/e5f795ce4f388524af8f5dd140146d52 5th! https://gyazo.com/bda17a199b63ca89d490ffe80ed331ec
You can copy the exception detail and post it here, anyway it looks like there is an issue with your selected sound file path for the sound alert.
You can reset the indicator to its first state by deleting its settings file which is located here:
%userprofile%\Documents\cAlgo
Delete the file "AlertPopupSettings_2.0.1.4.xml" and "Alerts_2.0.1.4.db", then test the indicator.
System.ArgumentException: The path is not of a legal form.
at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.GetFullPathInternal(String path)
at System.Media.SoundPlayer.ResolveUri(String partialUri)
at System.Media.SoundPlayer.SetupSoundLocation(String soundLocation)
at cAlgo.API.Alert.Launcher.PlaySound(String path)
at cAlgo.API.Alert.Launcher.TriggerAlerts(INotifications notifications, SettingsModel settings, AlertModel alert)
at cAlgo.API.Alert.Launcher.<>c__DisplayClass13_0.<Launch>b__0()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
I appreciate the reply! Sry i dont know why i didnt think of that, just goes to show how terrible i am lol. I also dont understand your instructions on how to fix the problem, i tried but i dont know where to find %userprofile%\Documents\cAlgo or where to delete the file "AlertPopupSettings_2.0.1.4.xml" and "Alerts_2.0.1.4.db" from :\
I am able to find the folder of the indicator, but all i can do is add it to my cTrader or delete it. I have just deleted it again for now, trying to get it to work :)
ThanksLook open Windows Run by pressing Window Button+R, and then type the following command:
%userprofile%\Documents\cAlgo
Click on the "Ok" button and it will open the cAlgo directory, there you will find the "AlertPopupSettings_2.0.1.4.xml" and "Alerts_2.0.1.4.db" files, delete both and test again the indicator.
I was able to replicate your issue, you have enabled the sound notification but not selected any sound file, once you removed the alert settings file the indicator will start to work fine again.
Its a minor bug on alert library and we will release a fix for it, but you should not enable the sound notification if you haven't selected a sound file.
I appreciate the detailed instructions greatly! I was able to get the sound alert to play once adding a sound file, so that was a success. Although I am still currently having trouble getting the telegram notification to play, I turned off the sound alert, and just started trying to get the telegram alert to work. I have deleted those 2 files you mentioned, before adding the alert indicator to the chart, Then once the alert indicator is added, I setup the telegram alert settings, by entering Channel name and bot token. It adds. But then on the next alert, something bugs it up again and causes cTrader to crash! So I don't receive an alert. This is the message I'm getting. I will be immensely happy if I'm able to get the telegram notification working so that I can receive alerts to my phone. Thank you
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at cAlgo.API.Alert.Launcher.<>c__DisplayClass8_0.<PutObjectInTemplate>b__3(String keyword)
at System.Collections.Generic.List`1.ForEach(Action`1 action)
at cAlgo.API.Alert.Launcher.PutObjectInTemplate(Object obj, String template)
at cAlgo.API.Alert.Launcher.SendTelegramMessage(TelegramSettingsModel settings, AlertModel alert)
at cAlgo.API.Alert.Launcher.TriggerAlerts(INotifications notifications, SettingsModel settings, AlertModel alert)
at cAlgo.API.Alert.Launcher.<>c__DisplayClass13_0.<Launch>b__0()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
@matt92
afhacker
26 Feb 2019, 20:13
RE: RE: RE: RE: RE: RE: RE: RE: RE:
matt_graham_92@hotmail.com said:
afhacker said:
matt_graham_92@hotmail.com said:
afhacker said:
matt_graham_92@hotmail.com said:
matt_graham_92@hotmail.com said:
afhacker said:
Download the compiled "algo" file from here: https://drive.google.com/open?id=1-pXB4XEJy7Eftom0dha21E379xvuucla
https://gyazo.com/347784a6ec02cb92f3dc7c560815f085 It also gives details here, unfortunately the info is in a small box that i can not make bigger by default. So I would have to send like 4 screen shots, and it would just be a mess to read.. here would be the first one.. https://gyazo.com/119cc47637e33437f48c95ab72fc26e6 2nd: https://gyazo.com/aef035e36755dc2ea41b8b95d6813029 3rd: https://gyazo.com/3697a3921f71e3e6cdc7c41dac0f8f06 4th: https://gyazo.com/e5f795ce4f388524af8f5dd140146d52 5th! https://gyazo.com/bda17a199b63ca89d490ffe80ed331ec
You can copy the exception detail and post it here, anyway it looks like there is an issue with your selected sound file path for the sound alert.
You can reset the indicator to its first state by deleting its settings file which is located here:
%userprofile%\Documents\cAlgo
Delete the file "AlertPopupSettings_2.0.1.4.xml" and "Alerts_2.0.1.4.db", then test the indicator.
System.ArgumentException: The path is not of a legal form.
at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.GetFullPathInternal(String path)
at System.Media.SoundPlayer.ResolveUri(String partialUri)
at System.Media.SoundPlayer.SetupSoundLocation(String soundLocation)
at cAlgo.API.Alert.Launcher.PlaySound(String path)
at cAlgo.API.Alert.Launcher.TriggerAlerts(INotifications notifications, SettingsModel settings, AlertModel alert)
at cAlgo.API.Alert.Launcher.<>c__DisplayClass13_0.<Launch>b__0()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
I appreciate the reply! Sry i dont know why i didnt think of that, just goes to show how terrible i am lol. I also dont understand your instructions on how to fix the problem, i tried but i dont know where to find %userprofile%\Documents\cAlgo or where to delete the file "AlertPopupSettings_2.0.1.4.xml" and "Alerts_2.0.1.4.db" from :\
I am able to find the folder of the indicator, but all i can do is add it to my cTrader or delete it. I have just deleted it again for now, trying to get it to work :)
ThanksLook open Windows Run by pressing Window Button+R, and then type the following command:
%userprofile%\Documents\cAlgo
Click on the "Ok" button and it will open the cAlgo directory, there you will find the "AlertPopupSettings_2.0.1.4.xml" and "Alerts_2.0.1.4.db" files, delete both and test again the indicator.
I was able to replicate your issue, you have enabled the sound notification but not selected any sound file, once you removed the alert settings file the indicator will start to work fine again.
Its a minor bug on alert library and we will release a fix for it, but you should not enable the sound notification if you haven't selected a sound file.
I appreciate the detailed instructions greatly! I was able to get the sound alert to play once adding a sound file, so that was a success. Although I am still currently having trouble getting the telegram notification to play, I turned off the sound alert, and just started trying to get the telegram alert to work. I have deleted those 2 files you mentioned, before adding the alert indicator to the chart, Then once the alert indicator is added, I setup the telegram alert settings, by entering Channel name and bot token. It adds. But then on the next alert, something bugs it up again and causes cTrader to crash! So I don't receive an alert. This is the message I'm getting. I will be immensely happy if I'm able to get the telegram notification working so that I can receive alerts to my phone. Thank you
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at cAlgo.API.Alert.Launcher.<>c__DisplayClass8_0.<PutObjectInTemplate>b__3(String keyword)
at System.Collections.Generic.List`1.ForEach(Action`1 action)
at cAlgo.API.Alert.Launcher.PutObjectInTemplate(Object obj, String template)
at cAlgo.API.Alert.Launcher.SendTelegramMessage(TelegramSettingsModel settings, AlertModel alert)
at cAlgo.API.Alert.Launcher.TriggerAlerts(INotifications notifications, SettingsModel settings, AlertModel alert)
at cAlgo.API.Alert.Launcher.<>c__DisplayClass13_0.<Launch>b__0()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
I'm aware of Telegram notification issue, I will release a new version of Alert library in the next few days and I will update this indicator too.
@afhacker
afhacker
27 Feb 2019, 15:54
Here are the new versions of New Bar and Bar Color change indicators:
Bar Color Change: https://drive.google.com/open?id=1zokGTCjrF9XxVQ-TRDH-XpC7X6AwASUR
New Bar: https://drive.google.com/open?id=1M9Vty1JKvh5baBkPAQ_g9YmYy2qLqWpz
using cAlgo.API; using cAlgo.API.Alert; using cAlgo.API.Internals; namespace cAlgo { [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)] public class BarColorChangeAlert : Indicator { #region Fields private int _lastAlertBarIndex; #endregion Fields #region Methods protected override void Initialize() { _lastAlertBarIndex = MarketSeries.Close.Count - 1; cAlgo.API.Alert.Models.Configuration.Current.Tracer = Print; } public override void Calculate(int index) { if (MarketSeries.Close[index] > MarketSeries.Open[index] && MarketSeries.Close[index - 1] < MarketSeries.Open[index - 1]) { TriggerAlert(index, "Bullish"); } else if (MarketSeries.Close[index] < MarketSeries.Open[index] && MarketSeries.Close[index - 1] > MarketSeries.Open[index - 1]) { TriggerAlert(index, "Bearish"); } } private void TriggerAlert(int index, string type) { if (index == _lastAlertBarIndex || !IsLastBar) { return; } _lastAlertBarIndex = index; Notifications.ShowPopup(TimeFrame, Symbol, type, "Bar Color Change"); } #endregion Methods } }
using cAlgo.API; using cAlgo.API.Alert; using cAlgo.API.Internals; namespace cAlgo { [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)] public class NewBarAlert : Indicator { #region Fields private int _lastAlertBarIndex; #endregion Fields #region Overridden Methods protected override void Initialize() { cAlgo.API.Alert.Models.Configuration.Current.Tracer = Print; _lastAlertBarIndex = MarketSeries.Close.Count - 1; } public override void Calculate(int index) { if (!IsLastBar || index == _lastAlertBarIndex) { return; } _lastAlertBarIndex = index; string type = MarketSeries.Close[index] > MarketSeries.Open[index] ? "Bullish Bar" : "Bearish Bar"; Notifications.ShowPopup(TimeFrame, Symbol, type, "New Bar Alert", MarketSeries.Open[index]); } #endregion Overridden Methods } }
@afhacker
matt92
06 Mar 2019, 16:59
Ahmad, I can't thank you enough for your tremendous efforts in creating an alert for every new bar, and every new bar of color change, absolutely indcredible work! You have just given the entire cTrader community an alert notification via your alert library indicator a way to see at what time each renko bar has opened/closed. I find that amazing! A very powerful tool. I am very grateful that you were able to update this alert in a timely fashion so that it has no more bugs and works flawlessly! All the pop-up, sound alert, e-mail, and telegram alerts for mobile, it truely is a high quality alert indicator powered with the renko bar alerts, Its awesome!
What I'm trying to use this for is to be alerted upon a new bar so that I can go check my chart(s) and see if the new bar has determined a crossover for my HMA or not, and then I have to keep checking continuously every new bar until the HMA (Hull Forcast custom cTrader indicator) proceeds to make the crossover, and then again, repeated.. Check every new bar until cross over.... And well it gets a bit tiresome, when I don't actually need an alert for every new bar printed, but more so an alert for every new dot color change - every new dot of a different color, either red or white dot.. on the HullForcast (HMA custom indicator for cTrader) indicator. Which can be found here with code. https://ctrader.com/algos/indicators/show/1696
Now, I know I have already messaged you about this on your site in the livechat, and you told me $30USD for the alert indicator that will notify me upon every new dot of a different color change. That is a great deal, very fair and I would simply have already just paid for it if I had $30USD, I still will pay for it, I just can't buy it right now, I don't have any income, so I can't just get $30 even though its only $30. I dont even have $30 right now and haven't for months. I am curious if the alert for every dot color change of the HMA, if the notification will also come via your alert library indicator? If so, is it an add on to the HMA indicator, and the 2 indicators will work simultaneously with one another, or do you add the alert library indicator to the HMA, so that it is 1 indicator? Much like the New Renko Bar Alert you have created. Because I noticed that the HMA(Hullforcast) does already have an alert notification (for dot color change), but problem is that its only a sound alert, no pop up, nothing.. so its impossible to receive the alert when not at the desk. When looking at your Alert Popup window indicator, It appears that it can be simply added to most, if not, any indicator by adding in the given code, I just don't know where to add it, I will mess it up, I know how to go about doing it in Automate section of cTrader, but after that I'm pretty much lost, and it can't get any easier than this, copy/paste. So I'm stuck writing to you instead, too see how I can go about getting the actual alert indicator I need for myself.
I am asking if you are willing to share the alert indicator for Hullforcast (HMA) - alert upon new dot color change. Not every dot, just the color change. I'm not certain if you already built it or will have built it momentarily upon reciveing the $30USD. Either way I can fully understand why you would not want to share everything free of charge, And I will have no other option but to purchase, but I had to at least ask, I will pay you for it in the future, even if I dont use it in any way after a few days. Thank you once again, I'm extremely grateful to even have the chance to buy what I need if I cant get it free source. I appreciate you and respect your decision.
@matt92
afhacker
06 Mar 2019, 17:56
RE:
matt_graham_92@hotmail.com said:
Ahmad, I can't thank you enough for your tremendous efforts in creating an alert for every new bar, and every new bar of color change, absolutely indcredible work! You have just given the entire cTrader community an alert notification via your alert library indicator a way to see at what time each renko bar has opened/closed. I find that amazing! A very powerful tool. I am very grateful that you were able to update this alert in a timely fashion so that it has no more bugs and works flawlessly! All the pop-up, sound alert, e-mail, and telegram alerts for mobile, it truely is a high quality alert indicator powered with the renko bar alerts, Its awesome!
What I'm trying to use this for is to be alerted upon a new bar so that I can go check my chart(s) and see if the new bar has determined a crossover for my HMA or not, and then I have to keep checking continuously every new bar until the HMA (Hull Forcast custom cTrader indicator) proceeds to make the crossover, and then again, repeated.. Check every new bar until cross over.... And well it gets a bit tiresome, when I don't actually need an alert for every new bar printed, but more so an alert for every new dot color change - every new dot of a different color, either red or white dot.. on the HullForcast (HMA custom indicator for cTrader) indicator. Which can be found here with code. https://ctrader.com/algos/indicators/show/1696
Now, I know I have already messaged you about this on your site in the livechat, and you told me $30USD for the alert indicator that will notify me upon every new dot of a different color change. That is a great deal, very fair and I would simply have already just paid for it if I had $30USD, I still will pay for it, I just can't buy it right now, I don't have any income, so I can't just get $30 even though its only $30. I dont even have $30 right now and haven't for months. I am curious if the alert for every dot color change of the HMA, if the notification will also come via your alert library indicator? If so, is it an add on to the HMA indicator, and the 2 indicators will work simultaneously with one another, or do you add the alert library indicator to the HMA, so that it is 1 indicator? Much like the New Renko Bar Alert you have created. Because I noticed that the HMA(Hullforcast) does already have an alert notification (for dot color change), but problem is that its only a sound alert, no pop up, nothing.. so its impossible to receive the alert when not at the desk. When looking at your Alert Popup window indicator, It appears that it can be simply added to most, if not, any indicator by adding in the given code, I just don't know where to add it, I will mess it up, I know how to go about doing it in Automate section of cTrader, but after that I'm pretty much lost, and it can't get any easier than this, copy/paste. So I'm stuck writing to you instead, too see how I can go about getting the actual alert indicator I need for myself.
I am asking if you are willing to share the alert indicator for Hullforcast (HMA) - alert upon new dot color change. Not every dot, just the color change. I'm not certain if you already built it or will have built it momentarily upon reciveing the $30USD. Either way I can fully understand why you would not want to share everything free of charge, And I will have no other option but to purchase, but I had to at least ask, I will pay you for it in the future, even if I dont use it in any way after a few days. Thank you once again, I'm extremely grateful to even have the chance to buy what I need if I cant get it free source. I appreciate you and respect your decision.
The indicator download link: https://drive.google.com/open?id=1hWoCeQX1w57iTbJOnvHxSNx7jtf6T_8g
And code (The code isn't mine, I just modified it a little bit and added the alert trigger code):
using System; using System.IO; using System.Collections.Generic; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Alert; namespace cAlgo.Indicators { [Indicator(IsOverlay = true, AutoRescale = false, AccessRights = AccessRights.FullAccess)] public class HullForcast : Indicator { #region Fields private int _lastAlertBar; private HullMovingAverage _movingAverage1; private HullMovingAverage _movingAverage2; private HullMovingAverage _movingAverage3; private IndicatorDataSeries _dataSeries; private IndicatorDataSeries _trend; private DateTime _openTime; #endregion #region Parameters [Parameter("Hull Coverage Period", DefaultValue = 35)] public int HullCoveragePeriod { get; set; } [Parameter("Hull Coverage Period Devisor", DefaultValue = 1.7)] public double HullPeriodDivisor { get; set; } [Parameter()] public DataSeries Price { get; set; } [Parameter("Alert", DefaultValue = true)] public bool Alert { get; set; } #endregion #region Outputs [Output("Up", PlotType = PlotType.Points, LineColor = "White", Thickness = 4)] public IndicatorDataSeries UpSeries { get; set; } [Output("Down", PlotType = PlotType.Points, LineColor = "Red", Thickness = 4)] public IndicatorDataSeries DownSeries { get; set; } #endregion #region Overridden Methods protected override void Initialize() { _dataSeries = CreateDataSeries(); _trend = CreateDataSeries(); var period1 = (int)Math.Floor(HullCoveragePeriod / HullPeriodDivisor); var period2 = (int)Math.Floor(Math.Sqrt(HullCoveragePeriod)); _movingAverage1 = Indicators.GetIndicator<HullMovingAverage>(Price, period1); _movingAverage2 = Indicators.GetIndicator<HullMovingAverage>(Price, HullCoveragePeriod); _movingAverage3 = Indicators.GetIndicator<HullMovingAverage>(_dataSeries, period2); cAlgo.API.Alert.Models.Configuration.Current.Tracer = Print; } public override void Calculate(int index) { if (index < 1) return; _dataSeries[index] = 2.0 * _movingAverage1.Result[index] - _movingAverage2.Result[index]; _trend[index] = _trend[index - 1]; if (_movingAverage3.Result[index] > _movingAverage3.Result[index - 1]) _trend[index] = 1; else if (_movingAverage3.Result[index] < _movingAverage3.Result[index - 1]) _trend[index] = -1; if (_trend[index] > 0) { UpSeries[index] = _movingAverage3.Result[index]; if (_trend[index - 1] < 0.0) { UpSeries[index - 1] = _movingAverage3.Result[index - 1]; if (IsLastBar) { if (MarketSeries.OpenTime[index] != _openTime) { _openTime = MarketSeries.OpenTime[index]; TriggerAlert(index, TradeType.Buy); } } } DownSeries[index] = double.NaN; } else if (_trend[index] < 0) { DownSeries[index] = _movingAverage3.Result[index]; if (_trend[index - 1] > 0.0) { DownSeries[index - 1] = _movingAverage3.Result[index - 1]; if (IsLastBar) { if (MarketSeries.OpenTime[index] != _openTime) { _openTime = MarketSeries.OpenTime[index]; TriggerAlert(index, TradeType.Sell); } } } UpSeries[index] = double.NaN; } } #endregion #region Other Methods private void TriggerAlert(int index, TradeType tradeType) { if (!IsLastBar || index == _lastAlertBar || !Alert) { return; } _lastAlertBar = index; Notifications.ShowPopup(TimeFrame, Symbol, tradeType, "Hull Forecast"); } #endregion } }
@afhacker
matt92
20 Mar 2019, 15:24
RE: RE:
afhacker said:
matt_graham_92@hotmail.com said:
Ahmad, I can't thank you enough for your tremendous efforts in creating an alert for every new bar, and every new bar of color change, absolutely indcredible work! You have just given the entire cTrader community an alert notification via your alert library indicator a way to see at what time each renko bar has opened/closed. I find that amazing! A very powerful tool. I am very grateful that you were able to update this alert in a timely fashion so that it has no more bugs and works flawlessly! All the pop-up, sound alert, e-mail, and telegram alerts for mobile, it truely is a high quality alert indicator powered with the renko bar alerts, Its awesome!
What I'm trying to use this for is to be alerted upon a new bar so that I can go check my chart(s) and see if the new bar has determined a crossover for my HMA or not, and then I have to keep checking continuously every new bar until the HMA (Hull Forcast custom cTrader indicator) proceeds to make the crossover, and then again, repeated.. Check every new bar until cross over.... And well it gets a bit tiresome, when I don't actually need an alert for every new bar printed, but more so an alert for every new dot color change - every new dot of a different color, either red or white dot.. on the HullForcast (HMA custom indicator for cTrader) indicator. Which can be found here with code. https://ctrader.com/algos/indicators/show/1696
Now, I know I have already messaged you about this on your site in the livechat, and you told me $30USD for the alert indicator that will notify me upon every new dot of a different color change. That is a great deal, very fair and I would simply have already just paid for it if I had $30USD, I still will pay for it, I just can't buy it right now, I don't have any income, so I can't just get $30 even though its only $30. I dont even have $30 right now and haven't for months. I am curious if the alert for every dot color change of the HMA, if the notification will also come via your alert library indicator? If so, is it an add on to the HMA indicator, and the 2 indicators will work simultaneously with one another, or do you add the alert library indicator to the HMA, so that it is 1 indicator? Much like the New Renko Bar Alert you have created. Because I noticed that the HMA(Hullforcast) does already have an alert notification (for dot color change), but problem is that its only a sound alert, no pop up, nothing.. so its impossible to receive the alert when not at the desk. When looking at your Alert Popup window indicator, It appears that it can be simply added to most, if not, any indicator by adding in the given code, I just don't know where to add it, I will mess it up, I know how to go about doing it in Automate section of cTrader, but after that I'm pretty much lost, and it can't get any easier than this, copy/paste. So I'm stuck writing to you instead, too see how I can go about getting the actual alert indicator I need for myself.
I am asking if you are willing to share the alert indicator for Hullforcast (HMA) - alert upon new dot color change. Not every dot, just the color change. I'm not certain if you already built it or will have built it momentarily upon reciveing the $30USD. Either way I can fully understand why you would not want to share everything free of charge, And I will have no other option but to purchase, but I had to at least ask, I will pay you for it in the future, even if I dont use it in any way after a few days. Thank you once again, I'm extremely grateful to even have the chance to buy what I need if I cant get it free source. I appreciate you and respect your decision.
The indicator download link: https://drive.google.com/open?id=1hWoCeQX1w57iTbJOnvHxSNx7jtf6T_8g
And code (The code isn't mine, I just modified it a little bit and added the alert trigger code):
using System; using System.IO; using System.Collections.Generic; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Alert; namespace cAlgo.Indicators { [Indicator(IsOverlay = true, AutoRescale = false, AccessRights = AccessRights.FullAccess)] public class HullForcast : Indicator { #region Fields private int _lastAlertBar; private HullMovingAverage _movingAverage1; private HullMovingAverage _movingAverage2; private HullMovingAverage _movingAverage3; private IndicatorDataSeries _dataSeries; private IndicatorDataSeries _trend; private DateTime _openTime; #endregion #region Parameters [Parameter("Hull Coverage Period", DefaultValue = 35)] public int HullCoveragePeriod { get; set; } [Parameter("Hull Coverage Period Devisor", DefaultValue = 1.7)] public double HullPeriodDivisor { get; set; } [Parameter()] public DataSeries Price { get; set; } [Parameter("Alert", DefaultValue = true)] public bool Alert { get; set; } #endregion #region Outputs [Output("Up", PlotType = PlotType.Points, LineColor = "White", Thickness = 4)] public IndicatorDataSeries UpSeries { get; set; } [Output("Down", PlotType = PlotType.Points, LineColor = "Red", Thickness = 4)] public IndicatorDataSeries DownSeries { get; set; } #endregion #region Overridden Methods protected override void Initialize() { _dataSeries = CreateDataSeries(); _trend = CreateDataSeries(); var period1 = (int)Math.Floor(HullCoveragePeriod / HullPeriodDivisor); var period2 = (int)Math.Floor(Math.Sqrt(HullCoveragePeriod)); _movingAverage1 = Indicators.GetIndicator<HullMovingAverage>(Price, period1); _movingAverage2 = Indicators.GetIndicator<HullMovingAverage>(Price, HullCoveragePeriod); _movingAverage3 = Indicators.GetIndicator<HullMovingAverage>(_dataSeries, period2); cAlgo.API.Alert.Models.Configuration.Current.Tracer = Print; } public override void Calculate(int index) { if (index < 1) return; _dataSeries[index] = 2.0 * _movingAverage1.Result[index] - _movingAverage2.Result[index]; _trend[index] = _trend[index - 1]; if (_movingAverage3.Result[index] > _movingAverage3.Result[index - 1]) _trend[index] = 1; else if (_movingAverage3.Result[index] < _movingAverage3.Result[index - 1]) _trend[index] = -1; if (_trend[index] > 0) { UpSeries[index] = _movingAverage3.Result[index]; if (_trend[index - 1] < 0.0) { UpSeries[index - 1] = _movingAverage3.Result[index - 1]; if (IsLastBar) { if (MarketSeries.OpenTime[index] != _openTime) { _openTime = MarketSeries.OpenTime[index]; TriggerAlert(index, TradeType.Buy); } } } DownSeries[index] = double.NaN; } else if (_trend[index] < 0) { DownSeries[index] = _movingAverage3.Result[index]; if (_trend[index - 1] > 0.0) { DownSeries[index - 1] = _movingAverage3.Result[index - 1]; if (IsLastBar) { if (MarketSeries.OpenTime[index] != _openTime) { _openTime = MarketSeries.OpenTime[index]; TriggerAlert(index, TradeType.Sell); } } } UpSeries[index] = double.NaN; } } #endregion #region Other Methods private void TriggerAlert(int index, TradeType tradeType) { if (!IsLastBar || index == _lastAlertBar || !Alert) { return; } _lastAlertBar = index; Notifications.ShowPopup(TimeFrame, Symbol, tradeType, "Hull Forecast"); } #endregion } }I was waiting to reply thanks a lot!! As I wanted to test the alerts before replying with many thanks.. I was super grateful and very happy when I saw that you shared the HMA color-change pop up alert. It has been so helpful being able to get mobile alerts via telegram, Its a tremendous help so far. Thank you very much.
Although, It was working flawlessly, unfortunately upon opening my cTrader on desktop Sunday evening when the markets have opened, cTrader crashed.. similar to how it crashed before.. I deleted the "AlertPopupSettings_2.0.1.4.xml" and "Alerts_2.0.1.4.db" files from %userprofile%\Documents\cAlgo and that seems to have fixed the issue. I don't know if this is even a problem needing to be fixed or if somehow something messed up on my end, But for now all is working seamlessly again, and I'm very happy about that. So that's great! Below is the error msg or w.e.
System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it.
at System.Windows.Threading.Dispatcher.VerifyAccess()
at cAlgo.API.Alert.Launcher.<>c__DisplayClass13_0.<Launch>b__0()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
There is one thing I have noticed with the HMA that I was wondering if you could help me to figure out, Somtimes the HMA doesn't calculate a change in color till the 2nd dot is created..This happens about 50% of the time or so, maybe more.. Causing a lot of missed trades, sometimes I am able to catch the 1st dot, Which is what I need. (so, on the 2nd dot is when the color change occurs, and it changes the previous dot color, which would have now been the 1st dot of a new color change) I'm curious if there is any way to fix that, since I need to catch it on the 1st dot color change in order to allow a trade to be put on. So, often I receive an alert, and check the chart the same minute, only to see that the HMA has already created a 2nd dot of a new color. (so 2nd white or red dot) Which just means the hma didnt calculate a color change till this 2nd dot. (since i checked chart right away) Is there is a way to change or fix this so that the HMA doesn't calculate a dot color change late (on 2nd dot but only calculates changes on the 1st), So no more 2nd dot color changes, but they all calculate on the 1st dot now, that would be awesome. But if any changes are done, I would hope for the HMA to stay the same, meaning I need to ensure that the dots are still coming in the same color on the same bars as they would have before any changes to calculations.. E.g if there was a 2000 setting on HMA, that the same crossovers would still occur at/on the same bar/time.. no actual changes to where the dots change color. Because I have a setting I trust, so I don't want that messed up in any way, if its off 1dot or something its no good anymore. If you could possibly shed some light as to why the HMA is calculating a change in color on 2nd dot, that would be amazing. I don't know if its just simply higher volatility and i miss the 1st dot (unlikely since im checking chart same minute as receiving the alert) Or if it has to do with HMA just being laggy sometimes. I would really like to figure this out because I plan on having a bot built to take these trades, So I'll need to understand it fully as well as not have it takes trades on a 2nd dot.
to recap, It has nothing to do with the alert itself, as the alert comes in the moment hma calculates a dot color change. So the problem is HMA sometimes calculates a dot color change on the 2nd dot. And I think that is due to the hma not calculating a dot color change right away, sometimes it takes 2 dots before it changes color, and by then 2 dots are now a new color, therefore missing the 1st dot color change where the trade is meant to be taken. I know the HMA is setup for changing color live and not waiting on a close, pretty sure. And thats how I need it to stay as well. If the dot color change is calculated on a close it wont work, so it will need to stay as is in that aspect.
I understand the HMA is not an indicator made by you, but if you are able to possibly assist me in understanding this, I would be more grateful than ever.
Thanks a lot I really do appreciate all of your efforts, Thank you.
@matt92
musicman
05 Nov 2019, 18:28
RE: RE: RE:
Hi Fellas, new member here.
This is great, but the colour change alert doesn't work when the HA is apoplied to a renko chart - the alert comes on when the renko changes colour - the ha changes colour at a different time to the renko.
any way of making one that works with a ha renko?
@musicman
withnail3
16 Sep 2020, 20:10
RE: RE: RE: RE:
radioglyn said:
Hi Fellas, new member here.
This is great, but the colour change alert doesn't work when the HA is apoplied to a renko chart - the alert comes on when the renko changes colour - the ha changes colour at a different time to the renko.
any way of making one that works with a ha renko?
Here is the latest version from the author.
using cAlgo.API;
using cAlgo.API.Alert;
using cAlgo.API.Alert.Enums;
using cAlgo.API.Alert.Models;
namespace cAlgo
{
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
public class BarColorChangeAlert : Indicator
{
#region Fields
private int _lastAlertBarIndex;
#endregion Fields
#region Parameters
[Parameter("Type", DefaultValue = AlertType.Popup, Group = "Alert")]
public AlertType AlertType { get; set; }
[Parameter("Show Window", DefaultValue = false, Group = "Alert")]
public bool ShowWindow { get; set; }
#endregion Parameters
#region Overridden methods
protected override void Initialize()
{
_lastAlertBarIndex = Bars.ClosePrices.Count - 1;
if (ShowWindow)
{
Notifications.ShowPopup();
}
}
public override void Calculate(int index)
{
if (Bars.ClosePrices[index] > Bars.OpenPrices[index] && Bars.ClosePrices[index - 1] < Bars.OpenPrices[index - 1])
{
TriggerAlert(index, "Bullish");
}
else if (Bars.ClosePrices[index] < Bars.OpenPrices[index] && Bars.ClosePrices[index - 1] > Bars.OpenPrices[index - 1])
{
TriggerAlert(index, "Bearish");
}
}
#endregion Overridden methods
#region Other methods
private void TriggerAlert(int index, string type)
{
if (index == _lastAlertBarIndex || !IsLastBar || AlertType == AlertType.None)
{
return;
}
_lastAlertBarIndex = index;
var alertModel = new AlertModel
{
TimeFrame = TimeFrame.ToString(),
Price = Bars.ClosePrices[index],
Symbol = Symbol.Name,
TriggeredBy = "Bar Color Change",
Time = Server.Time,
Type = type
};
if (AlertType == AlertType.Popup)
{
Notifications.ShowPopup(alertModel);
}
else if (AlertType == AlertType.Triggers)
{
Notifications.TriggerAlert(alertModel);
}
}
#endregion Other methods
}
}
@withnail3
javad.919
19 Sep 2021, 12:15
Resend indicator
Hello to every one .can some one resend indicator again .the link for downloding indicator dont work .thank,s
@javad.919
amusleh
20 Sep 2021, 08:34
RE: Resend indicator
javad.919 said:
Hello to every one .can some one resend indicator again .the link for downloding indicator dont work .thank,s
Hi,
You can download the indicator compiled algo file from here: Release 1.0.0 · afhacker/Bar-Color-Change-Alert (github.com)
@amusleh
javad.919
20 Sep 2021, 19:18
RE: RE: Resend indicator
amusleh said:
javad.919 said:
Hello to every one .can some one resend indicator again .the link for downloding indicator dont work .thank,s
Hi,
You can download the indicator compiled algo file from here: Release 1.0.0 · afhacker/Bar-Color-Change-Alert (github.com)
thank you so much mr amusleh
@javad.919
ClickAlgo
13 Nov 2018, 16:10
Hi Steven,
We can help you with this, please send your project description to contact@clickalgo.com and we will let you know the cost and estimated delivery date for the custom indicator.
Paul Hayes
Sales & Marketing
Email: contact@clickalgo.com
Phone: (44) 203 289 6573
Website: https://clickalgo.com
Twitter | Facebook | Google+ | YouTube | Pinterest | LinkedIn
@ClickAlgo