Enivid

Administrator
Staff member
Nov 30, 2008
19,404
1,566
144
Odesa
www.earnforex.com
Discuss the cTrader Position Sizer robot here. This cBot lets you calculate optimal position size and execute trades based on these calculations. It's a conversion of the popular MetaTrader Position Sizer EA.

Please note: this post's date has been modified to keep at the top of the thread. There was no public release of the cTrader Position Sizer before October 15, 2024.

Installation tutorial:
 
Last edited:

Mephist0

Trader
Mar 11, 2024
1
0
6
34
Hi everyone, I recently started to use cTrader, and I am wondering if there is an option to use anything similar to the position sizer we use for MT4/5?
 

mojster_jaka

Newbie
May 14, 2024
7
6
4
41
I also love your Position Sizer Expert, I use it daily on my MT5. I just started experimenting with CTrader, but your script is missing so much. It's burdensome opening trades without it.
 

toshin

Newbie
Oct 24, 2024
5
0
2
39
I was waiting eagerly for Position Sizer to be available on cTrader for months. Thank you for your hard work contributing to the community.
Unfortunately, there seems to be a problem. Whenever I try to set any parameter regarding the Take Profit on the interface, a system error occurs: a new guard page for the stack cannot be created. I tried restarting the laptop, but no luck at all.
1729798181760.png

Also, will there a function in the future to set Entry to Break even automatically after reaching a certain multiplier of SL?
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,404
1,566
144
Odesa
www.earnforex.com
I was waiting eagerly for Position Sizer to be available on cTrader for months. Thank you for your hard work contributing to the community.
Unfortunately, there seems to be a problem. Whenever I try to set any parameter regarding the Take Profit on the interface, a system error occurs: a new guard page for the stack cannot be created. I tried restarting the laptop, but no luck at all.
View attachment 29982

Also, will there a function in the future to set Entry to Break even automatically after reaching a certain multiplier of SL?
Does cTrader become unresponsive after that error? If not, what's the output in the Logs for that error? Does any red text appear on the chart after the error?

Also, I'd need some info on your system:
  • cTrader version
  • .NET version
  • Windows version
Thank you!
 

toshin

Newbie
Oct 24, 2024
5
0
2
39
Does cTrader become unresponsive after that error? If not, what's the output in the Logs for that error? Does any red text appear on the chart after the error?

Also, I'd need some info on your system:
  • cTrader version
  • .NET version
  • Windows version
Thank you!
Only Position Sizer closes and restarts. There is no red text either after the error popup. Even the Windows Event Viewer states no more information than the error popup.

cTrader 5.0.40
.NET SDK 8.0.403
Windows 10 Pro 22H2

I can tweak any value on the interface of Position Sizer. Just anything about the Take Profit area either change values or adding TP causes error.
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,404
1,566
144
Odesa
www.earnforex.com
Only Position Sizer closes and restarts. There is no red text either after the error popup. Even the Windows Event Viewer states no more information than the error popup.

cTrader 5.0.40
.NET SDK 8.0.403
Windows 10 Pro 22H2

I can tweak any value on the interface of Position Sizer. Just anything about the Take Profit area either change values or adding TP causes error.
Thank you for the info! And if you set the TP value via the input parameters? Does it result in the same crash?
 

toshin

Newbie
Oct 24, 2024
5
0
2
39
Actually, the TP values are being set via input parameters. But even though the values remain at 0,00000 eg. TP1x1.5 and also TP2 on the UI.
I just tried without using the input parameters. Same result. The UI boots without problems as long as I dont touch the add TP bottom or change the TP values or press the TPLock Function.
 

youforex

Trader
Oct 23, 2024
3
2
9
55
It would be very important for high frequency and high volume traders that the position sizer robot had the ability to execute asynchronous orders. Could you please make a change so that traders have the option to choose between synchronous and asynchronous orders? (commands: ExecuteMarketOrder and ExecuteMarketOrderAsync)
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,404
1,566
144
Odesa
www.earnforex.com
It would be very important for high frequency and high volume traders that the position sizer robot had the ability to execute asynchronous orders. Could you please make a change so that traders have the option to choose between synchronous and asynchronous orders? (commands: ExecuteMarketOrder and ExecuteMarketOrderAsync)
Do you need to execute a mix of sync/async orders or would you just switch to one type and work with it for a long period of time?
 

youforex

Trader
Oct 23, 2024
3
2
9
55
Do you need to execute a mix of sync/async orders or would you just switch to one type and work with it for a long period of time?
Hi. I just switch to one type and work with it forever. I prefer to use command ExecuteMarketOrderAsync instead of command ExecuteMarketOrder. But it would be interesting to put these options for the trader to choose from in the robot's initial settings.
I have a robot in mql5 language where the trader can choose between synchronous execution or asynchronous execution using the command m_trade.SetAsyncMode(ModoAsync) where ModoAsync can be true or false.
Thanks and best regards.
 
Last edited:
  • ℹ️
Reactions: Enivid

Enivid

Administrator
Staff member
Nov 30, 2008
19,404
1,566
144
Odesa
www.earnforex.com
Hi. I just switch to one type and work with it forever. I prefer to use command ExecuteMarketOrderAsync instead of command ExecuteMarketOrder. But it would be interesting to put these options for the trader to choose from in the robot's initial settings.
Thanks and best regards.
I see. I just ask to understand how it's best handled. I think it makes sense to add that as an input parameter then, since that's not changed too often.
 

youforex

Trader
Oct 23, 2024
3
2
9
55
Two videos to show to forum users the difference between synchronous execution and asynchronous execution.

Post automatically merged:

I see. I just ask to understand how it's best handled. I think it makes sense to add that as an input parameter then, since that's not changed too often.
Two videos to show to forum users the difference between synchronous execution and asynchronous execution.
View attachment Sync orders.mp4

View attachment Async orders.mp4
 

Attachments

  • Sync orders.mp4
    1.3 MB
  • Async orders.mp4
    1.5 MB
Last edited:

hrabon

Trader
Nov 11, 2024
1
0
6
31
Hi, so I copied the files in the Robots folder as per instructions but please how do I open the Position sizer window in the chart? I am new to Ctrader, prop firm forced me out of MT... Anyways huge thanks for the great help that Position Sizer provides!
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,404
1,566
144
Odesa
www.earnforex.com
Hi, so I copied the files in the Robots folder as per instructions but please how do I open the Position sizer window in the chart? I am new to Ctrader, prop firm forced me out of MT... Anyways huge thanks for the great help that Position Sizer provides!
You cannot just add a robot to a chart in cTrader. To use a robot, you go to Algo from Trade in the left menu:
1731357708898.png

If you copied everything correctly, the Position Sizer will be there among the cBots:
1731357786915.png
You can add an instance to a currency pair and timeframe of your choice there and then run it.
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,404
1,566
144
Odesa
www.earnforex.com
Ctrader showing this error on the chart. how to fix this? kindly help
When does it appear? Right after you run the instance? Does the Position Sizer panel appear on the chart? Are there any messages in the Journal/Log tabs?

Also, I'd need some info on your system:
  • cTrader version
  • .NET version
  • Windows version
Thanks!