Topics
Replies
GauchoHood
16 Nov 2024, 14:39
( Updated at: 16 Nov 2024, 18:59 )
RE: RE: How to code Increase of lot size
GauchoHood said:
PanagiotisCharalampous said:
Hi there,
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?
@GauchoHood
GauchoHood
16 Nov 2024, 14:10
( Updated at: 16 Nov 2024, 18:59 )
RE: How to code Increase of lot size
Hi there,
You can use the ModifyPosition method to change your position's volume.
Best regards,
Panagiotis
@GauchoHood
GauchoHood
15 Nov 2024, 16:03
Hi, I am trying to generate a script that increases the lotsize, of my original position as the position grows positive.
For example, after a 40 pips profit double the Lotsize. When talking to chatgpt, it said, ctrader does not allow to modify the lotsize directly, and I would need to open a new positio. I stead. Although, Ctrader has a “double lot size” button itself, so I assume there is a method or api that could do it. Please help! Thank you.for.reading!
@GauchoHood
GauchoHood
15 Nov 2024, 07:42
RE: MA TYPE PARAMETERS IN THE CLOUD
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
@GauchoHood
GauchoHood
24 Oct 2024, 16:30
RE: RE: RE: RE: MA TYPE PARAMETERS IN THE CLOUD
GauchoHood said: Wow, this is Crazy. Any Clues? I use different computers. A Mcbook at work and a PC at Home. And I cant see the option in either of them. Please help. My strategy really depends on it. Many thanks
PanagiotisCharalampous said:
GauchoHood said:
PanagiotisCharalampous said:
Hi there,
I cannot reproduce any problem. Can you share screenshots demonstrating this issue?
Best regards,
Panagiotis
As you can see. In the Cloud. The MA TYPES, Simple, triangular, hull, etc. Can not be selected.
What do you mean, when you said you found no error? Are the MA TYPE SHOWING in the cloud for you? Can you actually select them? Could you share a screen shot? Many thanks PANAGIOTIS!
Hi there,
Here is a screenshot
Best regards,
Panagiotis
@GauchoHood
GauchoHood
24 Oct 2024, 16:28
RE: RE: RE: MA TYPE PARAMETERS IN THE CLOUD
GauchoHood said:
PanagiotisCharalampous said:
Hi there,
I cannot reproduce any problem. Can you share screenshots demonstrating this issue?
Best regards,
Panagiotis
As you can see. In the Cloud. The MA TYPES, Simple, triangular, hull, etc. Can not be selected.
What do you mean, when you said you found no error? Are the MA TYPE SHOWING in the cloud for you? Can you actually select them? Could you share a screen shot? Many thanks PANAGIOTIS!
Hi there,
Here is a screenshot
Best regards,
Panagiotis
@GauchoHood
GauchoHood
23 Oct 2024, 16:52
( Updated at: 24 Oct 2024, 05:11 )
RE: MA TYPE PARAMETERS IN THE CLOUD
PanagiotisCharalampous said:
Hi there,
I cannot reproduce any problem. Can you share screenshots demonstrating this issue?
Best regards,
Panagiotis
As you can see. In the Cloud. The MA TYPES, Simple, triangular, hull, etc. Can not be selected.
What do you mean, when you said you found no error? Are the MA TYPE SHOWING in the cloud for you? Can you actually select them? Could you share a screen shot? Many thanks PANAGIOTIS!
@GauchoHood
GauchoHood
20 Nov 2024, 16:54 ( Updated at: 21 Nov 2024, 06:18 )
RE: RE: RE: RE: How to code Increase of lot size
PanagiotisCharalampous said:
Pana, you are a Legend Mate. It worked like a clock! 😃😃😃
@GauchoHood