
AlgoDeveloper

Info
Username: | afhacker |
Name: | AlgoDeveloper |
Member since: | 15 Oct 2015 |
Country: | Turkey |
Favorite symbols:
About
Signature
Last Algorithm Comments
@Pattern Drawing: 10 May 2021, 14:53
remon,
I will see what I can do regarding time frame visibility.
For changing cycle type there is no such option, but you can change the pattern labels one by one.
@Alert Popup Window: 27 Apr 2020, 12:02
Please use Github to report bugs, or contact us directly via our website if you need support.
@Alert Popup Window: 25 Apr 2020, 15:02
We are working on a new version that has much fewer dependencies and we will also fix the issue you reported.
It looks like you are triggering the same alert twice.
@Alert Popup Window: 24 Apr 2020, 14:28
Can you send me the error message next time you open your cTrader after the crash?
@Alert Popup Window: 22 Mar 2020, 11:04
To use the test indicator you have to install the "cAlgo.API.Alert" Nuget package, otherwise it will not work.
Please read the Github Wiki.
@Chart Switch: 17 Nov 2019, 08:48
Please read the documentation, you have to set maximum width/height.
Play a little bit with parameters.
@Alert Popup Window: 01 Nov 2019, 10:32
Now you can trigger the alerts (sound, email, Telegram) without showing the alert popup.
You can use the new "TriggerAlert" method of Notifications for triggering an alert without showing the popup window.
@Alert Popup Window: 15 Oct 2019, 10:57
This library writes the alert records on a LiteDB, which is a file-based object database.
I will add the silent mode feature, it will allow you to just write the alert record to the database but it will not show any popup.
The previous version of this library was using CSV files too, but due to performance issues, I switched to LiteDB.
You can open the alerts database file and browse the alerts with LiteDBViewer.
@Chart Calendar: 05 Oct 2019, 17:03
No, you will get only the compiled version of the indicator without source code.
If you need the source code you can contact us.
@Alert Popup Window: 03 Oct 2019, 13:20
I updated the documentation sample code, its hard for me to keep everything up to date so please use VisualStudio and IntelliSense will show you the method argument positions.
Anyone who wants to use this library on cTrader indicators/cBot, please use it with Visual Studio and install it via Nuget.
@Alert Popup Window: 02 Oct 2019, 17:16
@jedimaster Hello,
The issue with argument position, I have changed the position of arguments so you have to call the new overloads of ShowPopup method.
You can find all ShowPopup method overloads here:
https://github.com/afhacker/ctrader-alert_popup/blob/master/src/Alert/INotificationsExtensions.cs
@Supply And Demand Zones: 08 Aug 2019, 13:41
I haven't used this indicator on a bot by our selves but we have sold the source for other traders who are using the code on their bots and we don't know how was their result.
I don't recommend using this indicator without discretion.
@Market Profile: 19 Jun 2019, 07:03
Cody,
Damaging our reputation has really bad consequences for us, we put lots of hard work to develop these indicators and we sell it for very low price, you will get much lower quality indicators for other platforms like NinjaTrader and MT4 in 3-5 times of our prices from other companies.
The quality of our indicators are very high and we have a community of traders all around the world who are trading with our indicators, ex:
https://www.forexfactory.com/showthread.php?t=723604
And most of our indicators are free on our site, and we keep making more of our indicators free whenever we release new paid products.
@Market Profile: 19 Jun 2019, 06:56
I have sent you this email:
Hello Cody,
No we only have one site and its "algodeveloper.com", we don't sell our products on any other site or via any other reseller.
The indicator you bought isn't our indicator and its another indicator which is available on cTDN: https://ctrader.com/algos/indicators/show/1875
Please contact the site and owner of that indicator, and what makes you think that you bought it from us?
Either you are scammed are there is misunderstanding, but in both cases the issue it not related to us.
If you don't believe on my words then please try our indicator trial version which you download for free from our site: https://www.algodeveloper.com/product/market-profile/
We are a trusted company in cTrader community and we never scammed any body or sold any money making robot, we only sell high quality indicators and tools for cTrader which you can check by you self on our site.
In case you think you are scammed by the guy who sold you the indicator, you can do this:
1. Ask for a refund
2. Report it to cTrader team via forum or email so they will remove the indicator from cTrader.com
And please don't link your issue with us.
@Market Profile 1.2: 18 Jun 2019, 23:29
Hello codytell,
Please contact us via our site to solve your issue, I think you are still using the trial version and it shows the expiry message when the trial period which is 7 days has been expired.
Download the purchased full version from your account downloads page on our site and use it instead of the trial version.
Once you issue has been resolved please post in here and let everybody know that your issue has been resolved.
@Volume Profile 2.4: 01 May 2019, 16:13
Hello Lucas Hunter,
First of all thanks for purchasing our product, regarding adding POC no we can't add it to Volume Profile as the indicator purpose it to show the buy/sell volume, not the POC.
If you want to have POC please use our Market Profile indicator, if you want to we can change it for you even we don't have such a policy.
For changing it contact us via our website.
@Pivot Points Pro 1.0: 16 Apr 2019, 17:51
Please use another web browser or disable your browser extensions, our web site doesn't have any ads.
@Daily High/Low/Mean: 23 Mar 2019, 11:48
Thanks for providing your feedback, but we aren't going to add any other time frame H/L/M lines on this indicator.
Regarding adding labels the separator line separates each day lines so you don't need any label.
You might try my Custome Period Candles indicator that shows custom time frame candles on your current chart and it allows you to set the color and transparency.
This indicator is built by a request I received from a user, and we added everything he asked.
We aren't going to extend this and if you need anything specific for your self you can try our programming service or ask other cTrader consultants to build it for you.
@Alert Popup Window 2.0.1.1: 16 Mar 2019, 18:59
Open the Github repo page and then click on "Clone" button, then select the "Open in Visual Studio".
It worked fine for me, you can also download the repo as a zip and then open it with VS.
@Manual Strategy Tester: 05 Mar 2019, 13:36
Great idea!, I'm really interested in this and I can help you to extend it.
Send me an email: admin@algodeveloper.com
We can use a fully functional WPF app for this instead of that windows form.
@Market Profile 1.2: 19 Feb 2019, 19:42
Its an indicator but it is not free, there is no advertisement.
There is a free 7-day trial version that you can download from our site.
@Alert Popup Window 2.0.1.1: 19 Feb 2019, 19:40
No, it is not possible to set different sound files.
Regarding the Telegram issue, I will release a new version ASAP.
@Alert Popup Window 2.0.1.1: 19 Feb 2019, 19:38
It's not a bot, it's a library that allows you to show a popup window from your cTrader cBots or indicators.
@MACD Divergence: 14 Nov 2018, 12:21
Try ours: https://www.algodeveloper.com/product/macd-divergence/
Our MACD divergence indicator doesn't repaint at all and the formula it uses is much better than this indicator formula.
We also have an RSI divergence indicator.
I was the one who published MACD divergence indicator for the first time at cTDN and this is a copy of my idea but its free.
@Bar Analyzer 1.1: 01 Nov 2018, 20:13
Ok, I will release a version of it that will change the color of the bars instead
@Alert Popup Window 2.0.1.1: 22 Oct 2018, 19:10
Danis,
I have uploaded the new version DLL files to Google drive folder, download the new version DLL files
@Alert Popup Window 2.0.1.1: 22 Oct 2018, 13:22
Danis;
Did you installed the latest version of cAlgo.API.Alert.UI (2.0.1.1) package?
@Alert Popup Window 1.3.6: 14 Oct 2018, 08:36
Danis
In new version time column shows full date time, not just time, and you can show/hide columns, change columns size, and sort alerts based on all columns and it will remember all your changes.
Two new columns added, Price and Triggered By.
As you asked in the new version you can fully change the email subject/body and telegram message templates by using template keywords.
The thing I'm struggling with is avoiding multi popup opening with pipe server, that's the hard part and I'm doing my best to find a solution for it.
There is an issue on cTrader indicator initialization process, sometimes the indicator code executed twice upon initialization and it causes lots of issues for those indicators that show a window, I reported the issue and they said it will be fixed in November release.
Once I finished the pipe server issue and tested it fully I will release it.
The new version will be on Nugget so you will be able to install it from Visual Studio Nugget console or package manager.
Another major change is using cAlgo API INotifications interface for showing the popup, the popup show method is implemented as an extension method to INotifications interface so to show the popup you do this:
Notifications.ShowPopup(...);
Same like play sound and send email methods.
And you don't need to set your indicator/cBot to alert library on Initialize/OnStart method unless you need debugging info.
The new version code is written fully in MVVM pattern.
@Alert Popup Window 1.3.6: 13 Oct 2018, 17:29
Danis
The new version isn't finished yet, I will release it in the next few days with some really cool features like Telegram bot alert.
@Advanced Volume 3.1: 02 Oct 2018, 14:39
procumulative@gmail.com
We already have an indicator for showing volume strength: https://www.algodeveloper.com/product/high-and-low-volume/
@Alert Popup Window 1.3.6: 06 Sep 2018, 16:00
Check the log tab of cTrader => Automate and if there was any error message post it here, then I will be able to help you.
@Alert Popup Window 1.3.6: 05 Sep 2018, 18:15
clloyd.
The master branch contains the new version of the library which is under development and not released yet.
The current version is in branch 1.0 so clone that branch not the master and try to rebuild it.
In case you want to use the version 2.0 which is under development re-clone the master branch and try to build it again.
@Alert Popup Window 1.3.5: 02 Aug 2018, 17:50
Its free and open source, I developed it for cTrader users and there is no need to ask me for permission or anything else.
@2 Supertrend indicators on 1 chart: 02 Aug 2018, 17:49
You don't have to change timezone manually, the user can change timezone in alert popup settings.
@Supply And Demand Zones 2.1: 30 Jul 2018, 11:31
Try new version on Spotware cTrader 3.01, in this version you can modify zones on your chart and you can set the alert to trigger x pips before zone got touched by price.
@Supply And Demand Zones 2.0.2: 24 Jul 2018, 12:48
If you have any suggestion please send to admin@algodeveloper.com
We will reply back to you and we will tell if we are going to implement your suggestions on next version of indicator or not.
About buying the source code you can ask for a quote via above email.
@Supply And Demand Zones 2.0.2: 24 Jul 2018, 11:23
The period parameter defines how many previous bars from the current bar to check for identification of a zone so the higher the periods number the more previous bars will be scanned by indicator zone identification algorithm.
Whenever a bar closes the indicator checks if any new zone is formed or not, if indicator tries to check all bars from the start of your chart to the current bar it will make the indicator performance very slow so instead, it checks only x previous bar.
@Supply And Demand Zones 2.0.2: 24 Jul 2018, 11:12
The whole idea of the indicator is to recognize the zones, what you are asking is now possible with cTrader Automation API 3.01 update but we don't have any plan to develop an indicator to trigger an alert when the user drawn objects in chart got touched by price.
You can post a job in the jobs section or contact the consultants to help you.
@Supply And Demand Zones 2.0.2: 22 Jul 2018, 18:27
The indicator automatically extends the zone until it got touched by price x times (based on user setting) and it shows an alert popup whenever price reaches the zones.
@Alert Popup Window 1.3.5: 21 Jul 2018, 14:11
Alerts File Path: \Documents\cAlgo\alerts.csv
I made some changes, re-download the DLL files and try again.
Can you tell me what's your system language? culture setting?
@Alert Popup Window 1.3.5: 20 Jul 2018, 18:15
Delete the alerts CSV file, it's inside cAlgo folder in your documents.
Is it returning the same error message in logs?
@Alert Popup Window 1.3.5: 20 Jul 2018, 12:45
Test the new version and let me know if there was any issue.
@Alert Popup (WPF window) 1.3.4: 17 Jul 2018, 12:31
I will test it on Friday and then let you know the result.
@Alert Popup (WPF window) 1.3.4: 14 Jul 2018, 07:10
Use cTrader "Automation" and check the cBot / Indicator "Logs" tab, is there any error message?
@Alert Popup (WPF window) 1.3.4: 11 Jul 2018, 09:21
If you call the Trigger method with default TriggerType which is Per Bar then the popup should only appear once per each bar even if you call the Trigger method multiple times during time span of a single bar.
@Alert Popup (WPF window) 1.3.4: 15 Jun 2018, 05:51
I can't give you an exact date but I will do my best to do it in next few months.
@Alert Popup (WPF window) 1.3.4: 08 Jun 2018, 04:54
I will, the new version will have Telegram alert option too.
@Alert Popup (WPF window) 1.3.2: 18 Jan 2018, 09:58
the bug in alert library version 1.3.2 fixed, about fast MACD no I don't know how it's calculated.
@Alert Popup (WPF window) 1.3: 16 Jan 2018, 12:25
I have fixed the previous versions bugs please test the version 1.3 and let me know the result.
I tested the new version on Windows 10 FxPro cAlgo and it was working fine.
@Supply And Demand Zones 2.0: 09 Jan 2018, 17:28
@yong_alison please read the documentation: http://docs.algodeveloper.com/supply_demand/
Once you added the indicator to a chart you can change the indicator settings from "objects list":
https://drive.google.com/open?id=1hQ_fVGUm3UqMbStpkmUI-3TCd3fFS5V1
@Alert Popup (WPF window): 31 Oct 2017, 04:33
Your indicator access rights are set to "None", change it to full access.
And you are using the old alert library use the WPF version instead.
@Compare 1.1.1: 08 May 2017, 17:32
@suradi
Disable "Total Comparison" parameter if you want to use Fixed Date / Time Comparison.
@Compare 1.1.1: 08 May 2017, 13:38
@suradi
Start and end date / time parameters added and you can now compare specific time period instead of whole series.
@Compare 1.1: 07 May 2017, 16:25
@suradi
We added a new parameter that will allow you to sum the symbol percenatge change and see how much it changed from start of main chart first bar to latest bar.
@Compare: 05 May 2017, 16:14
@suradi
The bars date / time is based on your main chart, It shows how much price of a security changed based on % during that main chart bar date / time,
The way you want it will fully seperate the indicator provided data from main chart and it will be not possible to know the exact date / time of each line point that is possible now by looking at main chart bars open time.
Switch to daily chart and you will see each day comparison.
@cMulti 2.1.0(Updated): 09 Apr 2017, 18:47
@odomike It depends on your connection speed and your server location, If your server location was near Spotware servers and you had a good connection then it will be very low almost same like executing an order from your broker platform, You can use it's free demo version for testing purpose.
@Breakout Candle: 21 Oct 2016, 18:00
For showing a windows form(alert window) a bot must have unlimited access.
@Advanced Volume: 20 Sep 2016, 16:26
@DavalRista
Send me an email with more detail about your idea and I will create an indicator based on your idea.
my email: afhackermubasher@gmail.com
@Trade Tweeter: 20 Sep 2016, 16:18
@algoforce
I'm working on a newer version of this that use connect API and it will work fully as an standalone windows app so I may consider to add your request as a new feature.
@Alert Window: 04 Sep 2016, 18:53
@newbee
You can get metro framework files from their site by installing it via "NuGet" or downloading it from their GitHub:
http://dennismagno.github.io/metroframework-modern-ui/
And for "Alert.dll" file:
https://github.com/afhacker/Alert-Window/tree/master/Alert/bin/Release
@afhacker Dashboard: 21 Aug 2016, 20:44
The link that I gave for "isakov2" is already build-ed so you not need to rebuild it, If you want to see the code and have the whole project you can download the project from GitHub as a zip file and then extract it on your cAlgo robots folder then move "afhacker Dashboard.algo" file from project folder to cAlgo\Sources\Robots, Open your cAlgo and you will be able to see the code also you can build it.
@afhacker Dashboard: 21 Aug 2016, 09:31
Go to this link : https://github.com/afhacker/afhacker-Dashboard/blob/master/afhacker%20Dashboard.algo
And click "Download".
@afhacker Dashboard: 14 Aug 2016, 20:16
Yeah that's possible I will consider to add such thing in newer version.
@afhacker Dashboard: 11 Aug 2016, 11:13
@trend_meanreversion I'm using it on my cTrader and it works without any problem.
@afhacker Dashboard: 11 Aug 2016, 11:04
@trend_meanreversion Did you download it from my Google drive link?
@TMS Bot: 03 Aug 2016, 22:46
The TDI indicator parameters are default and you not need to make any change on it, Just turn on momentum and trend filters also for exit use exit based on TDI.
@TMS Bot: 20 Jul 2016, 22:40
Crashed in OnStop with ArgumentException: Cannot delete a subkey tree because the subkey does not exist.
Crashed in OnBar with NullReferenceException: Object reference not set to an instance of an object.
Above bugs fixed.
@MA Price Cross Bot: 21 May 2016, 21:19
@aisaac I don't have any comment about which parameters you are going to use but I recommend you to read some algo trading books before starting trading with any bot.
@CCI With Heikin Ashi: 12 May 2016, 17:14
Check this one: https://drive.google.com/file/d/0B93GK1Ip4NSMNkRwT3pjcmNtbkU/view?usp=sharing
@TMS Bot: 08 May 2016, 17:00
ironmine;
Please download the latest version and about parameters yeah I can help you.
Skype : nomanmubasher
@TMS Bot: 01 Apr 2016, 16:16
@ironmine If you never used TMS manually then I recommend you to don't use it's bot too.
@TMS Bot: 28 Mar 2016, 13:48
@ironmine you need to add below indicator as a reference:
https://drive.google.com/file/d/0B93GK1Ip4NSMMWZDS29odjg0UXM/view
@Rejection Candle Recognition: 14 Mar 2016, 16:19
@ellcz I just published it's bot: Rejection Candle Bot
Last Forum Posts
@Populating stop orders with predefined conditional TP and SL: 02 Apr 2021, 15:20
The numbers appeared on variable names because I copied the code, please use the code snippet of editor to post code as I do.
The variables are not defined, that's why you are getting that error, you have to first define a variable then use it.
Here is the code:
using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;
namespace cAlgo.Robots
{
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class aNarrowestCI : Robot
{
[Parameter(DefaultValue = 0.0)]
public double Parameter { get; set; }
private Bars series2, series3;
private Symbol symbol2, symbol3;
[Parameter(DefaultValue = "EURUSD")]
public string Symbol2 { get; set; }
[Parameter(DefaultValue = "GBPUSD")]
public string Symbol3 { get; set; }
protected override void OnStart()
{
var dailyBars = MarketData.GetBars(TimeFrame.Daily);
dailyBars.BarOpened += OnDailyBarsBarOpened;
}
void OnDailyBarsBarOpened(BarOpenedEventArgs obj)
{
var Lag1USDCADHigh = obj.Bars.HighPrices.Last(1);
var Lag1USDCADOpen = obj.Bars.OpenPrices.Last(1);
var Lag1USDCADLow = obj.Bars.LowPrices.Last(1);
var Lag1USDCADOpenHigh = Lag1USDCADHigh - Lag1USDCADOpen;
var Lag1USDCADOpenLow = Lag1USDCADOpen - Lag1USDCADLow;
var Lag1USDCADVolume = obj.Bars.TickVolumes.Last(1);
var Lag1USDCADPropOH = (Lag1USDCADOpenHigh / Lag1USDCADOpen) * 100;
var symbol2 = Symbols.GetSymbol(Symbol2);
series2 = MarketData.GetBars(TimeFrame.Daily, Symbol2);
var GBPUSDYDaysClose = series2.ClosePrices.Last(0);
var Lag1GBPUSDHigh = series2.HighPrices.Last(0);
var Lag1GBPUSDLow = series2.LowPrices.Last(0);
var Lag1GBPUSDOpen = series2.OpenPrices.Last(0);
var Lag1GBPUSDOpenLow = Lag1GBPUSDOpen - Lag1GBPUSDLow;
var Lag1GBPUSDOpenHigh = Lag1GBPUSDHigh - Lag1GBPUSDOpen;
var Lag1GBPUSDPropHighLow = ((Lag1GBPUSDHigh - Lag1GBPUSDLow) / Lag1GBPUSDOpen) * 100;
var symbol3 = Symbols.GetSymbol(Symbol3);
series3 = MarketData.GetBars(TimeFrame.Daily, Symbol3);
var Lag1EURUSDHigh = series3.HighPrices.Last(0);
var Lag1EURUSDOpen = series3.OpenPrices.Last(0);
var Lag1EURUSDVolume = series3.TickVolumes.Last(1);
// < 1.10
//Long Model 5
var FM5LongMath = -1 + (2 * Lag1USDCADHigh) + (3* Lag1USDCADOpenLow) + (4 * Lag1GBPUSDOpenLow) + (-5 * Lag1GBPUSDPropHighLow) + (6 * Lag1EURUSDHigh);
//Short Model 2
var FM2ShortMath = -7 + (8 * Lag1USDCADLow) + (9 * Lag1USDCADOpenHigh);
var FM5LongSL_15 = -10;
var FM2ShortSL_15 = 9;
//>= 1.10 GBPUSDYDaysClose < 1.20
//Long Model 5
var FM5LongSL_15_20 = -8;
//Short Model 3
var FM3ShortMath = 7 + (6 * Lag1USDCADLow) + (5 * Lag1USDCADOpenHigh) + (-4 * Lag1GBPUSDOpen);
var FM3ShortSL_15_20 = 3;
//>= 1.20 GBPUSDYDaysClose < 1.25
//Long Model 5
var FM5LongSL_20_25 = 2;
//Short Model 2
var FM2ShortSL_20_25 = 1;
// >= 1.25 GBPUSDYDaysClose < 1.30
//Long Model 5
var FM5LongSL_25_30 = -1;
//Short Model 2
var SM2ShortMath = -2 + (3 * Lag1USDCADOpen) + (4 * Lag1USDCADPropOH);
var SM2ShortSL_25_30 = 5;
//>= 1.30 GBPUSDYDaysClose < 1.45
//Long Model 5
var FM5LongSL_30_45 = -6;
//Short Model 4
var FM4ShortMath = 7 + (8 * Lag1USDCADLow) + (9 * Lag1USDCADOpenHigh) + (-8 * Lag1GBPUSDOpen) + (-1 * Lag1USDCADOpenLow);
var FM4ShortSL_30_45 = 2;
//GBPUSDYDaysClose >= 1.45
//Long Model 1
var BM1LongMath = -3 + (4 * GBPUSDYDaysClose) + (5 * Lag1USDCADOpen) + (-6 * Lag1USDCADVolume) + (-7 * Lag1GBPUSDOpenHigh) + (8 * Lag1EURUSDVolume) + (9 * Lag1USDCADOpenHigh) + (8 * Lag1USDCADOpenLow) + (7 * Lag1GBPUSDPropHighLow) + (6 * Lag1EURUSDOpen);
var BM1LongSL_45 = -54.13;
//Short Model 3
var FM3ShortSL_45 = 102.914;
double TargetLongMath = 0;
double TargetShortMath = 0;
if (GBPUSDYDaysClose < 15)
{
TargetLongMath = FM5LongMath;
// var LongSL = FM5LongSL_15;
//var TargetShortMath = FM2ShortMath;
// var ShortSL = FM2ShortSL_15;
}
else
{
if ((GBPUSDYDaysClose >= 15) && (GBPUSDYDaysClose < 20))
{
TargetLongMath = FM5LongMath;
//var LongSL = FM5LongSL_15_20;
//var TargetShortMath = FM3ShortMath;
//var ShortSL = FM3ShortSL_15_20;
}
else if ((GBPUSDYDaysClose >= 20) && (GBPUSDYDaysClose < 25))
{
TargetLongMath = FM5LongMath;
// var LongSL = FM5LongSL_20_25;
//var TargetShortMath = FM2ShortMath;
//var ShortSL = FM2ShortSL_20_25;
}
else if ((GBPUSDYDaysClose >= 25) && (GBPUSDYDaysClose < 30))
{
TargetLongMath = FM5LongMath;
// var LongSL = FM5LongSL_25_30;
//var TargetShortMath = SM2ShortMath;
// var ShortSL = SM2ShortSL_25_30;
}
else if ((GBPUSDYDaysClose >= 30) && (GBPUSDYDaysClose < 45))
{
TargetLongMath = FM5LongMath;
// var LongSL = FM5LongSL_30_45;
//var TargetShortMath = FM4ShortMath;
//var ShortSL = FM4ShortSL_30_45;
}
else if (GBPUSDYDaysClose >= 45)
{
TargetLongMath = BM1LongMath;
// var LongSL = BM1LongSL_45;
//var TargetShortMath = FM3ShortMath;
//var ShortSL = FM3ShortSL_45;
}
//Long structure
//var Targetlong = TargetLongMath;
var TargetLong = (Math.Round(TargetLongMath, 3));
var TargetPipslong = TargetLong - Symbol.Bid * Symbol.PipSize;
var TargetPipsLong = (Math.Round(TargetPipslong, 3));
//Short structure
var TargetShort = (Math.Round(TargetShortMath, 3));
var TargetPipsshort = TargetShort - Symbol.Ask * Symbol.PipSize;
var TargetPipsShort = (Math.Round(TargetPipsshort, 3));
foreach (var position in Positions)
{
ClosePosition(position);
}
if (TargetPipsLong > 0)
{
if (TargetPipsShort > 0)
{
var risk = 0.95;
double Volume = (long)Math.Ceiling(Account.Equity / 100) * risk;
double MaxVolume = Volume / 100;
Volume = Symbol.NormalizeVolumeInUnits(Volume, RoundingMode.Down);
if (Volume > 100)
Volume = 100;
var SLprop = 0.0;
var SLBid = (Math.Round(Symbol.Bid * SLprop, 2));
var SLAsk = (Math.Round(Symbol.Ask * SLprop, 2));
var TPBidProp = TargetPipsLong;
var TPBid = (Math.Round(TPBidProp * Symbol.PipSize, 2));
var TPAskProp = TargetPipsShort;
var TPAsk = (Math.Round(TPAskProp * Symbol.PipSize, 2));
PlaceStopOrder(TradeType.Buy, SymbolName, Volume, Symbol.Bid + 3 * Symbol.PipSize, "OpenStopBuy", SLBid, TPBid, Server.Time.AddHours(23));
PlaceStopOrder(TradeType.Sell, SymbolName, Volume, Symbol.Ask - 3 * Symbol.PipSize, "OpenStopSell", SLAsk, TPAsk, Server.Time.AddHours(23));
}
}
}
}
protected override void OnTick()
{
// Put your core logic here
}
protected override void OnStop()
{
// Put your deinitialization logic here
}
}
}
Last, your bot will not work as you expect, please learn C# basics before writing a cBot/indicator.
@Display Chart.DrawStaticText() over a Canvas Rectangle: 02 Mar 2021, 11:41
amirus.stark said:
Hi there,
It's been hours since I'm trying to Display some Chart.DrawStaticText() over a Canvas Rectangle, I need to do it that way because characters have different colors, is there a way to perform this by changing Chart.DrawStaticText()'s Zindex ? if yes, how please ?
Thanks
Why you are not using text block? you are trying to mix chart objects with chart controls, Canvas is a chart control, and the Chart.DrawStaticText draws a chart object on the chart.
You have to use a chart control inside canvas not an object, try text block.
You can add multiple text blocks for each character so they will have different colors.
@Inherit from cAlgo.API.Bot: 12 Dec 2020, 12:44
There is no "cAlgo.API.Bot" class, you should inherit from "cAlgo.API.Robot" class, it works fine for me both for cBots and indicators.
The only problem is with "Parameter" attribute, if you define your parameters on base class for inherited classes the parameters will not show up on cTrader because they have set the "Parameter" attribute "Inherited" property to "False", not sure why they did that, I hope they fix this issue so we will be able to have our common parameters on single base class, for now the only solution is to make the parameter properties abstract so the child classes must override those parameter properties.
@Move the x axis below indicator Window: 24 Oct 2020, 15:02
This is a suggestion for changing the order around cTrader charts, the chart x axis right now is above indicators window:
Please move at the bottom of all indicators window with bars count down.
And another problem is we can't change an indicator window size to fill the whole chart area, this is the most we can:
We should be able to fill the whole chart space with an indicator window, the limitation must be removed, and the quick trade buttons must come on top of everything that is fill the chart area (chart itself or any indicator window).
This will allow developers to develop indicators that will replace the built-in chart.
There are lots of limitations on cTrader that doesn't make any sense, or you can add an option or way to hide the main chart altogether and only left the indicator windows like TradingView eye button for indicator windows that show/hide an indicator.
@Looking for ML.NET sample - Machine Learning in Visual Studio: 23 Oct 2020, 19:29
cTrader will migrate to .NET core and in future you will be able to use ML.NET, but if you are a serious algo trader and want to use ML on your algos then there is no need to wait, you don't have to use even .NET at all for your ML stuff, use Keras or any other ML library like Sklearn with Spotware Open API.
You can also use ML.NET with Open API, I use Python when it comes to ML and for trading I use Open API.
If you don't want to use Open API or the authentication is hard for you to implement you can use Python ML libs for building your model and then you can send the ML model signal to a cBot with a socket connection.
I love .NET but for ML its not so mature right now.
@Copying cTrader to MetaTrader 4: 20 Oct 2020, 18:13
We have added the bidirectional cTrader to MetaTrader 4 copying to cMAM.
@Ctrader on Linux: 10 Oct 2020, 00:16
hslagter said:
I was excited about cTrader and wanted to move from MQL5 EAs to cTrader cBots. Unfortunately, cTrader does not work on Linux (wine). Are there any prospects if it ever will to work on Linux?
It works with VirtualBox on Linux and Mac.
@Compile .proto files: 28 Sep 2020, 21:54
ctid2032775 said:
PanagiotisCharalampous said:
Hi Christian,
The procedure explains how to compile C# files. this is what I use as well and works fine.
Best Regards,
Panagiotis
Hi Panagiotis,
when I try this I get the following error:
Translation:
The system cannot find the mentioned file.
Can you please provide me with exactly the version you are using to compile .proto into .cs!
Thanks and best regards,
Christian
You can compile the Open API proto files with the latest version of Protobuf, you can use my library which is based on latest version of Protobuf:
@SMS Alert to tell you when price has hit a set MA (ie 20 MA): 19 Sep 2020, 11:37
rad256 said:
afhacker said:
rad256 said:
Hi All,
Does anyone know of a bot that can send an alert SMS to tell me when price has hit a set moveing average. If it is not already available, who can I contact to discuss the making of such a robot.
Any suggestion will be welcome. I look forward to hearing from you.
Kind Regards
Ranford
SMS is slow, expensive, and not that easy to implement but yes its possible to use it on a cTrader indicator/cBot via 3rd party services, instead you should use Telegram, its much easier to implement, faster, and it doesn't cost you anything.
If you want to implement Telegram alert on your indicator/cBot you can do it with just one line of code by using my free open source alert popup library:
Thanks for your reply. I would like to try your code. How do I get it and the intructions on how to set it up? I already have Telegram on my phone so that is good news.
I look forward to hearing from you.
Regards... Ranford
All you need for implementing the popup library on your indicator/cBot is here:
@SMS Alert to tell you when price has hit a set MA (ie 20 MA): 18 Sep 2020, 12:20
rad256 said:
Hi All,
Does anyone know of a bot that can send an alert SMS to tell me when price has hit a set moveing average. If it is not already available, who can I contact to discuss the making of such a robot.
Any suggestion will be welcome. I look forward to hearing from you.
Kind Regards
Ranford
SMS is slow, expensive, and not that easy to implement but yes its possible to use it on a cTrader indicator/cBot via 3rd party services, instead you should use Telegram, its much easier to implement, faster, and it doesn't cost you anything.
If you want to implement Telegram alert on your indicator/cBot you can do it with just one line of code by using my free open source alert popup library: