Replies

PanagiotisCharalampous
16 Nov 2024, 11:50

RE: travailler avec plusieurs comptes cTrader en même temps

lahutinieremichel said: 

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.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
16 Nov 2024, 11:47

Hi there,

Which application do you use and which broker is this?

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
16 Nov 2024, 11:45

Hi there,

You can use the ModifyPosition method to change your position's volume.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
16 Nov 2024, 11:42

Hi there,

Could you please send us some troubleshooting information the next time this happens? Please paste a link to this discussion inside the text box before you submit it.

Best regards,

Panagiotis
 


@PanagiotisCharalampous

PanagiotisCharalampous
16 Nov 2024, 11:40

Hi Vasilie,

Try using https://openapi.ctrader.com/apps/token to retrieve the token and let me know if this works.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
15 Nov 2024, 14:28

Hi there,

You first need to talk to ClickAlgo about this.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
15 Nov 2024, 14:26

RE: RE: when adding to a losing/winning trade, it changes the take profit

walt50050 said: 

PanagiotisCharalampous said: 

Hi there,

Unfortunately I did not understand your problem. Can you please explain it using screenshots?

Best regards,

Panagiotis

 

100 leverage

1% of account, take profit 1%

the price drops, I re enter with 1% of account, take profit 1%

however now the price need to reach 2% to give me back 1%

why is Ctrader doing this? maybe because the drawdown was too high?

 

 

Unfortunately I cannot help you if you do not provide the information I am asking for


@PanagiotisCharalampous

PanagiotisCharalampous
15 Nov 2024, 10:46

RE: RE: RE: RE: Trading for this account is disabled. Trading for this symbol is currently disabled.

sumarasarjil said: 

sumarasarjil said: 

PanagiotisCharalampous said: 

sumarasarjil said: 

 I am showing disabled symbols on my desktop and I am not able to place any trade, is there any solution for this, please help me fast.

Please talk to your broker

 

 

Hi there, 

Your responses are empty

Best regards,


@PanagiotisCharalampous

PanagiotisCharalampous
15 Nov 2024, 10:45

RE: RE: MA TYPE PARAMETERS IN THE CLOUD

GauchoHood said: 

PanagiotisCharalampous said: 

No clues unfortunately. Can you record a video demonstrating the whole UI and the entire process of adding an instance and reproducing the issue? Maybe it can provide some information we are missing

Hi Panagiotis, hope you are well. Look. I need help to code an increase with the lotsize while my position progresses. For example, when 2 pips positive, double the lot. But the Chatgpt is saying it is not possible to increase Lotsize in Ctrader. Although, we have a button on Ctrader that do Just that, Double the.position size. 

Can you help me please

 

Hi there,

Please create a separate thread with your question and make it more specific. Tell me what information is missing and what is stopping you from implementing this yourself so that I can help you.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
15 Nov 2024, 06:56

RE: RE: Make Ctrader able to trade futures

iNeurons said: 

PanagiotisCharalampous said: 

Hi there,

You can trade futures with cTrader as long as your broker offers them.

Best regards,

Panagiotis

I have yet to find any brokers that offer futures on cTrader. Could you please let us know which brokers provide this service?

Unfortunately I cannot advertise brokers. You would need to contact them yourself


@PanagiotisCharalampous

PanagiotisCharalampous
15 Nov 2024, 06:53

Hi there,

Unfortunately I did not understand your problem. Can you please explain it using screenshots?

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
15 Nov 2024, 06:51

RE: RE: How is the new EntryPrice (& thus Pips etc) of a modified or partially closed Position calculated?

martins said: 

PanagiotisCharalampous said: 

Hi there,

The entry price of the position is the average entry price of the deals composing the position. If the position has only one opening deal, then the opening price should not change. If more opening deals are involved e.g. you have increased the size of the position after entering it, the entry price might change as partial volume is closed and deals removed from the position.

Best regards,

Panagiotis

Ok, thanks, that's helpful. I can see from logging that when the volume of a position is INCREASED the calculation of its new Position.Pips value is exactly:
 (oldPips * oldVol - spreadAsPips * increaseInVol) / newVol
which is correctly distributing the pips on the old portion plus the immediate pip loss of the new portion (due to spread) across the new larger volume (and so the EntryPrice will be that many pips from the current price and represent the weighted average). Rounding of the calculation seems usually to the nearest 0.1 pip but sometimes goes the other way, possibly to correct for accumulated rounding error. That's all fine.

HOWEVER, I'm seeing the remaining portion of a position after a REDUCTION in volume ALSO has its Position.Pips altered. Why is that?
Possibly the position was not combined really (in the live server or backtest memory) but rather kept as a collection of parts from each modification that increased volume, so that when it is later reduced some specific part is closed, in a LIFO or FIFO order or some other rule? Is this broker driven? 

So maybe ModifyPosition does not really modify a position in the sense of ending up with one homogeneous position with a single EntryPrice & Pips profit? Can't brokers running cTrader handle merging modification deals into one net holding?

If not, please could the doc say so, and how do we know what the separate parts are so we can predict partial closing results (without laboriously keeping track of all modifications)? Is there any information in a Position that can tell a cBot the position's stats will not react in a predictable way if later PARTIALLY closed ('predictable' meaning Entry & Pips stay unchanged, profit prorata etc)? 

I'm coming to the conclusion it's not good to mix increasing and decreasing volume via ModifyPosition; one or the other yes, predictable, but not both in the same cBot if it's basing decisions on Position.Pips or Account.UnrealizedProfit, or on almost anything other than Equity.

Thanks.

 

Update re "laboriously keeping track": not that hard, but involves keeping ‘account state’ data outside the cTrader account, like in a local file or cloud, not self-contained in the positions - unless perhaps cTrader could add a large Account.Comment field that could store arbitrary data, or make the Positions.Comment modifyable & bigger?? :) 


modifyDeals.Count=95 i=58 modifyDeals[i].Id=6 modifyDeals[i].Vol=19000 modifyDeals[i].Bid=1.36653 modifyDeals[i].Ask=1.36656
modifyDeals.Count=95 i=59 modifyDeals[i].Id=6 modifyDeals[i].Vol=13000 modifyDeals[i].Bid=1.36404 modifyDeals[i].Ask=1.36407
modifyDeals.Count=95 i=60 modifyDeals[i].Id=5 modifyDeals[i].Vol=4000 modifyDeals[i].Bid=1.36399 modifyDeals[i].Ask=1.36402
modifyDeals.Count=95 i=61 modifyDeals[i].Id=6 modifyDeals[i].Vol=-230000 modifyDeals[i].Bid=1.3605 modifyDeals[i].Ask=1.36053
modifyDeals.Count=95 i=62 modifyDeals[i].Id=5 modifyDeals[i].Vol=-230000 modifyDeals[i].Bid=1.3605 modifyDeals[i].Ask=1.36053
modifyDeals.Count=95 i=63 modifyDeals[i].Id=6 modifyDeals[i].Vol=-77000 modifyDeals[i].Bid=1.36007 modifyDeals[i].Ask=1.3601
modifyDeals.Count=95 i=64 modifyDeals[i].Id=5 modifyDeals[i].Vol=-77000 modifyDeals[i].Bid=1.36007 modifyDeals[i].Ask=1.3601
modifyDeals.Count=95 i=65 modifyDeals[i].Id=6 modifyDeals[i].Vol=10000 modifyDeals[i].Bid=1.35909 modifyDeals[i].Ask=1.35912
modifyDeals.Count=95 i=66 modifyDeals[i].Id=5 modifyDeals[i].Vol=19000 modifyDeals[i].Bid=1.36651 modifyDeals[i].Ask=1.36654
modifyDeals.Count=95 i=67 modifyDeals[i].Id=5 modifyDeals[i].Vol=10000 modifyDeals[i].Bid=1.36892 modifyDeals[i].Ask=1.36895
modifyDeals.Count=95 i=68 modifyDeals[i].Id=5 modifyDeals[i].Vol=13000 modifyDeals[i].Bid=1.37044 modifyDeals[i].Ask=1.37047

  struct modifyDeal {     // https://stackoverflow.com/questions/33809867/c-sharp-struct-in-a-list
  public int Id { get; set; }
  public double Vol { get; set; }
  public double Bid { get; set; }
  public double Ask { get; set; }
  public modifyDeal(int id, double vol, double bid, double ask)
  { Id = id; Vol = vol; Bid = bid; Ask = ask; }
 }

 List<modifyDeal> modifyDeals = new List<modifyDeal>(); // 14nov24

    var deal = new modifyDeal(position.Id, newVolume - position.VolumeInUnits, Symbol.Bid, Symbol.Ask);
   //or deal.Id = position.Id; etc
   modifyDeals.Add(deal); 

Might be able to extract same info using the History interface possibly (how far back does it go?), but haven't found all the doc about it, for instance where is History.OrderByDescending() other than in the example https://help.ctrader.com/ctrader-algo/references/Trading/History/History/#examples 

Later: Actually only one adjustment number per position might need remembering in order to emulate proportional netting when partially closing a position that has been increased earlier - the difference between ‘the proportional Pips or Entry expected before the partial close is done’ and ‘the actual new Pips or new Entry that appears in the Position afterwards’ - so the Bot can apply that offset to later Pips & profit (with opposite adjustment to Balance).
Is there any way of storing a small amount of data per position on the server, for instance a modifyable Comment? 
 

Hi there,

HOWEVER, I'm seeing the remaining portion of a position after a REDUCTION in volume ALSO has its Position.Pips altered. Why is that?
Possibly the position was not combined really (in the live server or backtest memory) but rather kept as a collection of parts from each modification that increased volume, so that when it is later reduced some specific part is closed, in a LIFO or FIFO order or some other rule? Is this broker driven? 

This is what I explained in my previous post. Positions are just collections of deals traded in a FIFO manner.

Is there any information in a Position that can tell a cBot the position's stats will not react in a predictable way if later PARTIALLY closed ('predictable' meaning Entry & Pips stay unchanged, profit prorata etc)? 

There isn't. As you correctly pointed out, if you need this information, you need to track it your self. 

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
15 Nov 2024, 06:45

Hi there,

Try using multiple profiles

https://help.ctrader.com/ctrader/interface/settings/?h=profiles#startup

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
15 Nov 2024, 06:41

RE: RE: Risk-Reward - Market order lots not computer properly ?

all-raceway0m said: 

PanagiotisCharalampous said: 

Hi there,

I did not understand what you are doing and what exactly is happening. Can you record a video so that we can understand what you are looking at?

Best regards,

Panagiotis

Hi,

I undwerstood from this video that I can fix a risk reward (lets sasy 100 usd) and when I move My SL on a limit order the nb of lots is computed automatically to keep 100 usd of risk.
And that if I change to market order the nb of lots will be computer when I click the buy/sell button based on the current price to respect 100 usd risk.

https://help.ctrader.com/ctrader-web/charts/risk-reward/

On video below that I did we can see:

  • when I chose limit order and fix the risk to 100 usd. nb of lots is computed automatically when i change the entry point
  • when I change to market order and place the order the nb od lots is not recomputed but the last computed for the entry poitn which his not righ

https://share.icloud.com/photos/0adBeJVHTTMum0RYU3eeekHmQ

My be I understood wrong the feature for market order.., if i understood wrong can you any idea how I can do this as I want to always have the same risk

Thanks

Hi there,

It is impossible to set the risked amount exactly at a fixed stop loss price, since the trade eventually needs to be rounded at a volume that meets the minimum step set by the broker. Therefore you will get an approximation at best. The tool calculates the exact volume that needs to be traded for that amount to be risked but eventually you need to trade the closest valid volume.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
14 Nov 2024, 14:23

RE: RE: The ability To Copy And Paste Build Errors & Results for code debugging. (Mind Numbingly Infuriating)

Enivid said: 

PanagiotisCharalampous said: 

Hi all,

Just use an external IDE for development. You can do this with a click of a button and get all the development functionalities you need. The built in editor is appropriate only for simple projects.

Best regards,

Panagiotis

 

Even with simple projects, one often needs to copy the error messages. Moreover, the new developers and advanced users who are learning to code are likely doing that in cAlgo and they are those who are most likely to encounter compilation errors they need to copy (to ask other developers about).

They can do that in an IDE. The product team will not divert resources from other important features to build something that already exists and can be used immediately.


@PanagiotisCharalampous

PanagiotisCharalampous
14 Nov 2024, 09:31

Hi all,

Just use an external IDE for development. You can do this with a click of a button and get all the development functionalities you need. The built in editor is appropriate only for simple projects.

Best regards,

Panagiotis

 


@PanagiotisCharalampous

PanagiotisCharalampous
14 Nov 2024, 07:02

RE: RE: Impossible to save charts models

f3nryll said: 

PanagiotisCharalampous said: 

Hi there,

Can you record a video demonstrating what exactly is happening?

Best regards,

Panagiotis

https://drive.google.com/file/d/14eP04mOEHZhxJ0Shv4MKpJvKFv3rxAt1/view?usp=drive_link

Hi there,

Thank you. The product team will investigate this issue and resolve it in an upcoming update.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
14 Nov 2024, 06:48

Hi there,

The entry price of the position is the average entry price of the deals composing the position. If the position has only one opening deal, then the opening price should not change. If more opening deals are involved e.g. you have increased the size of the position after entering it, the entry price might change as partial volume is closed and deals removed from the position.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
14 Nov 2024, 06:41

Hi there,

I don't think you can install cMAM on Linux.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
13 Nov 2024, 12:23

RE: RE: cBot that references several Renko periods

ene.andrei.plc said: 

PanagiotisCharalampous said: 

Hi mariusgunnerud,

It is on the roadmap but we do not have at ETA at the moment.

Best Regards,

Panagiotis

Hi Panos,

Apologies if this is available elsewhere, but has this been added to cTrader? Having issues finding it in the KB.

Regards,

Andrei

Hi Andrei,

Yes, renko charts are available in backtesting 

Best regards,

Panagiotis


@PanagiotisCharalampous