Thread was posted at 13 November with subject name “Position Manager”
Can you please share the link?
I have a hard time trying to share the link so I’ll just copy and paste it here instead.
here it is:
“So here’s the thing, it’s been around 8-9 months since the risk-reward tool was launched in the web version and still to have this feature in desktop. Since this tool is still not available and I love cTrader I started looking for available Position Managers out there and guess what, all of the good ones out there have issues with Mac desktop.
In my case a position manager like this is very important so I had to move to MT5 and purchase one there to trade.
I say all this because it’s a petty to lose Traders for such things. CTrader for me is literally better than MT5 in every aspect but this one thing forced me to move to them. I’m sure there’s a whole bunch of traders out there that choose MT5 over cTrader for that one reason. I believe everyone would benefit if you guys do something about this.
All love, keep it up”
Thank you! The feature is under development, it should be available early next year.
I’ve tried using the suggested URL https://openapi.ctrader.com/apps/token in almost every possible place in my code, including replacing both the auth_url and token_url:
python
Code kopieren
# URLs for authentication and token retrieval self.auth_url = 'https://openapi.ctrader.com/apps/auth' self.token_url = 'https://openapi.ctrader.com/apps/token'
Unfortunately, despite these efforts, I’m still getting the "ACCESS_DENIED" error when trying to retrieve the access token.
Is there a specific way or place where this URL is supposed to be used that I might be missing? Also, would it be possible for someone to review my code or point out any common pitfalls I might be encountering?
Ελπίζω ειλικρινά να μπορέσετε να με βοηθήσετε περαιτέρω. Η υποστήριξή σας είναι ανεκτίμητη!
Με εκτίμηση,
Vasilios Gerasimou
Hi Vasilie,
Can you share a video demonstrating the exact steps you follow to receive this error, as well as the exact link for which the access is denied?
Please provide your complete code and explain to us how we can see what you are looking at. Also explain what you would expect to see instead.
Best regards,
Panagiotis
Hi, so the problem only occurs when I open positions, even when I tried to take the easiest example from the Internet where in the video it works normally, it doesn't work for me :( setting up pending positions works normally and I can set SL and TP as I like
using System; using cAlgo.API; using cAlgo.API.Collections; using cAlgo.API.Indicators; using cAlgo.API.Internals;
namespace cAlgo { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class ThreeWhiteSoldiersAndThreeBlackCrows : Robot { [Parameter(DefaultValue = 1)] public double Volume { get; set; }
[Parameter(DefaultValue = 200)] public double TakeProfit { get; set; }
[Parameter(DefaultValue = 300)] public double StopLoss { get; set; }
protected override void OnBar() {
// Check if there are open positions if (HasOpenPositions()) return;
ExecuteMarketOrder(TradeType.Sell, SymbolName, Volume, "ThreeBlackCrows", stopLoss, takeProfit); } } private bool HasOpenPositions() { foreach (var position in Positions) { if (position.SymbolName == SymbolName) return true; } return false; } } }
Even if I enter the number of pips directly into the Execute Order function, the bot still sets my SL and TP to over 2k pips.
Hi there,
The example you provided uses price levels as a stop loss and take profit. If it still doesn't work when you use pips, please share the updated code and screenshots demonstrating what happens.
Thanks for your kind words. I am not sure why you got the impression that the source in Bollinger Bands cannot change. You can use any source you need. See below where you can do it
Best regards,
Panagiotis
Thank you for your reply.
The issue is two fold. The MACD is still on the chart above the RSI using the MACD data. Maybe there is a way to remove the MACD and keep the the RSI using the MACD data? Then attaching the Bollinger Bands to the RSI does appear to be as easy changing the source parameters for the Bollinger Bands to the RSI, but the Source parameter is grayed out and cannot be changed. I tried to play around with the settings and could not achieve the singular subwindow with the Bollinger Bands on the RSI using the previous MACD data, (unseen same sub window). I am new to cTrader, so I hope there is a way to do this setup, because it is the best setup that exists, im my opinions. Please check it out.
Thank you,
Louis B.W.
Hi there,
The MACD is still on the chart above the RSI using the MACD data. Maybe there is a way to remove the MACD and keep the the RSI using the MACD data?
No the indicator needs to be on the chart in order to use it as a source. Alternatively, you need to code your own indicator.
but the Source parameter is grayed out and cannot be changed.
You need to add the source when you add the indicator on the chart. You cannot change it later. So make sure your RSI indicator is already on the chart before you add the Bollinger Bands indicator.
Best regards,
I tried that and it worked. Thank you. I plan on having all my indicators from MT4 converted over the cTrader. The Bollinger Bands in cTrader would be of better usefulness if levels could be added the Bollinger Bands because levels create signals when the RSI value crosses the levels. Can the levels be writting into a Bollinger Bands indicator? And an EA automatic software algorithm, cAlgo have Bollinger Band levels? Thank you.
Hi there,
It is not possible to add levels in the built in Bollinger Bands indicator. But you can develop your own custom indicator and add levels if you wish, it should not be hard.
I did try something experimental, not wanting real takeprofit or stoploss action, by keeping a calculated average EntryPrice as an override encoded in the StopLoss or TakeProfit (as 4 times the actual value so as not to trigger a real take or stop) and only needing to be maintained for volume alterations from the 1st time each position is reduced, so the adjustment to its pips/profit & balance could be made from then on. Probably not particularly useful, but can work without storing any ‘state data’ outside of cTrader if not wanting real take or stop, and without needing to track or read the whole history.
A modifyable Position.Comment would be better, and useful for other purposes too, has it been considered?
Seems my local only just upgraded and removed sortino/sharpe.
Why did it get removed?
Is there any workaround for this or some plugin or other way we can get this?
My past experience with cTrader optimization is you get pretty poor results if you can't see either sharpe or sortino.
Hi there,
The previous calculation was not correct and the information required to properly calculate these metrics (risk free ratio) is not available in cTrader.
You can use the ModifyPosition method to change your position's volume.
Best regards,
Panagiotis
Hi Panagiotis. if (position.UnrealizedNetProfit >= profitThreshold) { // Tried to adjust the volume double newVolume = position.VolumeInUnits * multiplier; position.ModifyPosition(newVolume); // Attempted this, but it did not work }
attempted to use the ModifyPosition method to adjust the position's volume based on certain profit thresholds. Here’s the code I used:.
However, this did not work. Upon further reading, I discovered that ModifyPosition is designed to modify properties like stop loss and take profit, and not the position's volume.
Could you confirm if there’s a method or approach to modify the volume of an open position directly, or if this is strictly not supported in cTrader?
Ah non ! J'ai parlé trop vite, l'environnement graphique est unique pour toutes les sessions ! Ce matin en préparant le travail pour la semaine prochaine, je découvre que l'environnement graphique que j'avais créé pour le deuxième compte a disparu au profit du premier compte.
Dommage, peut-être un axe de développement pour cTrade desktop ?
Il faudrait vraiment que l'équipe de développement puisse nous mettre en place que les sessions puissent être totalement indépendantes, j'imagine que nous sommes nombreux a utiliser plusieurs comptes en même temps.
Hi there,
Make sure you are using different workspaces on each profile.
Could you pleasesend us some troubleshooting information the next time this happens? Please paste a link to this discussion inside the text box before you submit it.
PanagiotisCharalampous
18 Nov 2024, 06:34
RE: Inactive Status
firemyst said:
Market hours are different to market sessions. Market hours are set by the broker. Market sessions are global.
@PanagiotisCharalampous