jaredthirsk's avatar
jaredthirsk's avatar


Member since: 18 Dec 2015





Last Algorithm Comments

@Smart Grid:  18 Feb 2017, 03:45

This bot looks incredibly dangerous if you don't know what you're doing (but then I guess all of forex is if you don't know.)  It's sad to see someone lost their account here. Looks like a martingale style keep increasing risk until you win, but if you keep risking until you run out of equity, you are doomed.  

@USDX Dollar Index:  05 May 2016, 10:19

marekfx, I created an indicator derived on this.  May I post it and keep your copyright notice and add my own copyright notice? (I will make my additions CC0 license.) My indicator: overlay by default option to inverse (very useful for gold and silver) Current USDX pinned to current gold price; scroll back to see relative bullishness/bearishness of current symbol. configurable amplitude magnification.  Uses exponent.  1.9 seems to match XAUUSD very closely. Kitco has their "Did gold really go up $x.xx?", now I have my own indicator.  I was shocked how closely the price action follows the USDX most of the time.  

Last Forum Posts

@Fix Optimization settings issue: max commission is too low for crypto:  28 Jul 2022, 03:58

Two brokers I use charge 0.08% and 0.18% on crypto pairs.  On 1 million, that's $800 / $1800.

Problem: Optimizer refuses to run if above 150!

Recommended fix: get the brokers to lower their commission below 150 :)

Alternative fix: change the max to something that is 2000 or higher.

@100% CPU usage after a week of runtime:  03 Aug 2020, 22:49

[edited: resolved one of my own performance issues that I realized I created due to experimentation with performance.  Still keeping an eye on things.]

@cAlgo.NET framework version:  01 Jun 2019, 11:43

I think this discussion as a prerequisite needs to understand in-place upgrades for .NET 4.  Here are some articles from 2012 that perhaps give an adequate overview:



Suggestion for Spotware: for your new Robot/Indicator csproj project templates, change the default to something from this era, like 4.6.1 or 4.7.2 or 4.5 or something. 4.0 Client Profile may technically work (if I understand it right?) but it sounds like people have problems with nuget (?) so it might be better to at least go to 4.5.

@cAlgo.NET framework version:  01 Jun 2019, 11:37

jaredthirsk said:


.NET 4 Client Profile is basically abandoned by Microsoft -- everybody has moved on (.NET 4.6.2).  Is cTrader/cAlgo abandoned?

As a followup to my comment from 21 months ago: the recent changes to cTrader are impressive, and it doesn't feel abandoned (anymore) -- it feels like it is getting some love.  Keep up the good work and I hope you prioritize features that make the biggest difference to successful trading.

@cAlgo.NET framework version:  01 Jun 2019, 11:16

mpistorius said:

andrewfblake said:

I had this problem too and did not want to change anything in cAlgo.... but managed to fix it simply by editing the Bot in Visual Studio and updating that to the new framework 4.6.2.... It then calls my Class Library in 4.6.2 and works like a dream... no need for Spotware to do any updates :-) 

Would you care to elaborate on this, please?  Is there some workaround to use new language features from, say C#7?  When I try to build my project in Visual Studio, I still get errors from the cAlgo extension trying to build a .algo file.  And I cannot disable the extension, then the project won't load.

What errors are you seeing?  People may be able to help if they know.

FWIW, my workflow: (admittedly complex, most people should maybe ignore most of this unless they are going deep into coding possibilities like me, though maybe it shows how you might be able to use newer .NET)

  • For most of my code, I prefer .NET Standard 2.0 (I create DLLs from Visual Studio) and I believe I use the latest language features, C# 7.3 whatever, though I don't know if I'm using the new data types like tuples and Span<>s and such or if those would conflict. 
  • The DLL I reference from cTrader in my algos is currently .NET 4.7.2.  I will probably try 4.8 here soon.  There isn't much code in this DLL -- it mostly pulls in my other netstandard DLLs.  I created this DLL from Visual Studio.
    • I am a programming junkie and have a bunch of DLLs, but it is a pain to get a kajillion references correct in all my cAlgo projects, so I merge everything to one DLL using ILRepack as a post-build event.
  • When I create a new bot in cTrader, I go to add references and add my one big DLL (.NET 4.7.2).  I just leave the cTrader project at whatever Spotware created it as -- I guess Spotware still defaults to 4.0 Client?  That is crazy, but I guess it doesn't matter to me.  I noticed on one bot I made, I changed the cAlgo\Sources\Robots\xyz\xyz.csproj to v4.7.2, though I don't think I even need to do this, generally speaking:
    • Default:
      • <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    • New:
      • <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
  • My new bots in cTrader references a base class instead of Robot, so that I get some logic from my base class, such as my custom GetFitness scoring system. (I base it on annualized ROI divided by max equity drawdown.)
  • For some bots, I started moving most trading logic to my own DLLs.  I am hoping to at some point host them in my own .NET console app and use FIX protocol, instead of hosting them inside of cTrader, which is a resource hog if I want to run say 200+ bots, which I think is actually a reasonable goal for people working towards being serious algotraders.  Also, I have a memory leak problem when optimizing using cTrader (not sure if it's my fault or spotware's), and if I only have one VPS that did both (probably demo account) bots and optimization, I obviously wouldn't want to shut down and restart cTrader and start all the bots up again every time I ran out of memory.  I don't want to have to rent a bunch of expensive VPS's.  I plan to run them on relatively cheap linux VPS's using .NET Core.  
    • Long-term FEATURE REQUEST: Ideally, Spotware would release some sort of UI-less bot service for running bots, and a command line interface to start/stop/query bots, which runs on .NET Core and supports Windows/Linux(/and it may work on Macs for free.)
  • I forgot what the Visual Studio extension even does.  But I should try to do the right click and edit in Visual Studio thing more often, since editing within cTrader is relatively painful (yet convenient) IDE compared to VS2019.
  • I use new Newtonsoft.JSON (version 12)
    • Every time Spotware releases a new version of cTrader, I have to hunt down the cTrader.exe.config file in c:\users\myname\appdata\local\apps\2.0\{random}\{random}\brokername...ctrader...\ and do a .NET Assembly binding redirect for Newtonsoft.Json to whatever version Spotware is using.  Spotware has been shipping v9 but I see they just switched to v10.  Hurrah.  I might switch to another JSON serializer just to avoid having to do this.  Since I am logging optimization runs, I might get a perf boost if I switch to a more performant library anyway.  Microsoft started shipping their own very fast serializer -- I might try that if it is compatible.
  • Caveat: I'm not 100% sure how safe this is, or if anything could possibly break from one version of cTrader to the next, though I tend to think that if all netstandard2.0 and .NET 4.7.2 code paths of my bot work, then I am probably good for the time being.

@GetFitness History: Please provide min/max equity for each trade:  25 Mar 2019, 06:11


It is important to me to have the min and max equity that cTrader captures and shows on its optimize/backtest result chart.  I think you already have the data -- can you expose it via GetFitnessArgs in GetFitness?

Maybe you throw out the data for all but the top 20 results -- ok, but can we at least have it for the top 20 results?  (Maybe that number should be configurable somewhere.)



@Bug? Or Misleading? - Unexpected Equity Drawdown value and percent:  21 Jun 2018, 15:40

Panagiotis Charalampous said:

Hi Jared,

Please send it at community@spotware.com.

Best Regards,


I sent it in.  Thanks for looking into it.

@Bug? Or Misleading? - Unexpected Equity Drawdown value and percent:  21 Jun 2018, 11:58

Panagiotis Charalampous said:

Hi Jared,

Thanks for pointing this out. We are having a look at it. Any change you could share the cBot with us?

Best Regards,


Sure, is there a way I can send it to you?

@Bug? Or Misleading? - Unexpected Equity Drawdown value and percent:  20 Jun 2018, 13:27


I'm making a bot that keeps positions open a long time and trying to make ones that have low equity drawdown percent.  

As you can see, the equity is around 4000 and drops to around 3600 which is a drawdown of around 10%.

However, cTrader 3.0 is telling me my max equity drawdown is only 0.66%, or $6.57.  That's off by a factor of 15!!

Is there some magical definition of 'equity drawdown' that I am not aware of or is this a bug?  Is Equity drawdown only updated when a position is closed?  (or any other event? Such as opened?)

Spotware, I can send you my bot code if you want to repro yourself.  But it's just a bot that keeps adding trades in a market that is trending over a long term.


@Can't log in via iOS app using cTrader ID:  09 Oct 2017, 05:54

jaredthirsk said:

Update: I updated my app in the App Store, but now instead of saying "Open this page in ...__" it doesn't do that, and I am stuck at a website.  My options are to change my language or log out or view my profile.

... same thing on iPad.  All I see is the webpage "Why cTrader ID improves my trading experience".

Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.

No uploaded.

Warning! Executing cBots downloaded from this section may result in loss of funds. Use them at your own risk.

No uploaded.