Thanks @PanagiotisCharalampous. Is there a temporary solution/hack I could use locally while you're guys finishish a proper fix? It's just a showstopper that stops the whole work I'm doing.
Unfortunately there isn't. It seems that some data of the specific broker is corrupted and needs to be fixed
I trade gold in lots. For example 0.22 units. Thanks for the help.
Hi Andrea,
It seems you are converting your Quantity from quantity to volume in units. Hence the input is translated to lots, not to units. What symbol are you trading and what is the lot size?
Best regards,
Panagiotis
Hi Andrea,
What is the lot size of your broker e.g. for IC Markets is 100 units per lot. So if you type 0.22, it will trade 22 Oz of gold.
I installed the version pf MacBook c trader but the advance protection option is not exist on it and there is no even the bottom of advance option. I will be appreciated for helping me.
best regards.
Hi there,
This is not available at the moment, it will be added in an upcoming release.
Good morning, thanks, I will try to do as you say.
14-01---ok I managed it but it gives me a problem. I put a textBox that takes a string and saves it in the Quantity variable. The latter is linked to the Button_Click_Buy function. In the execution phase I enter a value in the textbox, for example 0.10, I click the button and it opens the position without the decimal part so 10.00. Another example: I enter 0.01 and set the variable to 1.00. What did I do wrong? Thank's my friend.
It seems you are converting your Quantity from quantity to volume in units. Hence the input is translated to lots, not to units. What symbol are you trading and what is the lot size?
You can use a flag to achieve this e.g. bool CanTrade. Set it to false when a trade is taken and then set it back to true when a new bar is opened.
Best regards,
Panagiotis
Thanks Panagiotis,
I have attempted the code below, but believe I am missing something as it places multiple trades per bar, but trader per bar after bar is opened. I attempted to limit positions with Positions.Count, but that stops it being placed per bar.
protected override void OnTick() { if (IncludeBreakEven == true) GoToBreakEven();
var Ema1 = _ema1.Result.Last(0); var Ema2 = _ema2.Result.Last(0); var Ema1i = _ema1.Result.Last(2); var Ema2i = _ema2.Result.Last(2); var Ema3 = _ema3.Result.LastValue; var rising = _ema1.Result.IsRising(); var falling = _ema2.Result.IsFalling(); var rising2 = _ema2.Result.IsRising(); var falling2 = _ema1.Result.IsFalling();
var Ema1 = _ema1.Result.Last(0); var Ema2 = _ema2.Result.Last(0); var rising = _ema1.Result.IsRising(); var falling = _ema2.Result.IsFalling(); var rising2 = _ema2.Result.IsRising(); var falling2 = _ema1.Result.IsFalling();
private void CloseSell() { var Ema1 = _ema1.Result.Last(0); var Ema2 = _ema2.Result.Last(0); foreach (var position in Positions) if (Ema1 < Ema2 && position.TradeType == TradeType.Sell)
{ ClosePosition(position); } }
private void CloseBuy() { var Ema1 = _ema1.Result.Last(0); var Ema2 = _ema2.Result.Last(0); foreach (var position in Positions) if (Ema1 > Ema2 && position.TradeType == TradeType.Buy) { ClosePosition(position); } }
Hi Ryan,
The flag needs to be set to false immediately after the order is executed. You seem to set it to false at random positions. Unfortunately I do not have the time to write the entire strategy for you. If you are not able to code this yourself, you can request for professional assistance.
cTrader Copy works using an equity to equity model. Therefore the volume will be proportional to your strategy provider's volume. You cannot chance the volume yourself.
Please send us some troubleshooting info and quote the link to this discussion by pasting a link to this discussion inside the text box before you submit it.
I solved it with cbot and not with the indicator. However, I'm curious to see your solution. If you want I'll attach the code and tell me what you think.
Hi Andrea,
You cannot execute orders through indicators. It needs to be a cBot.
Please explain what exact help to you need. Nobody will do the job for you but we are happy to help you do it yourself
Best regards,
Panagiotis
Hello!
Thank you for your reply. I need to figure out how can I use/reference my code to custom indicators specifically KeltnerChannel ATR (average true range) instead of Keltner Channels (Simple) readily available indicator.
PanagiotisCharalampous
15 Jan 2024, 13:43
RE: Error when opening cTrader
ctid3999979 said:
Hi there,
Can you please install the latest update and let us know if it resolves the issue?
Best regards,
Panagiotis
@PanagiotisCharalampous