
Ahmad Noman Musleh Blocked

Info
Username: | amuslehBlocked |
Name: | Ahmad Noman Musleh |
Member since: | 01 Mar 2021 |
Country: | Turkey |
About
Signature
Last Forum Posts
@Position volume breakup: 21 Jun 2022, 10:43
m4trader4 said:
With the above approach there can be positive or negative pips at target (take profit). The same can be done through CTrader gui.
How to approach the same?
Hi,
Not sure what do you mean by positive / negative Pips, you can create the same cTrader advanced take profit functionality inside your cBot.
Check the number of Positions Pips on each OnTick, if it reached X pips close X% of it's volume, and record the position on a collection like a List.
It all depends on your coding skill.
@Windows Form - TopMost: 21 Jun 2022, 10:40
Hi,
But in 4.1 it was not the behaviour what changed
Yes, this is a behavior change, we are not going to change it back to 4.1 behavior as it's not possible.
Let me know how this can be achieved with FORM or without FORM
We are going to add dialog and window to the API that mimics the looks of cTrader and uses current controls, then you don't have to use WinForms or WPF.
Is there a way to move a button within the child window
What do you mean?
@Delete my account: 21 Jun 2022, 09:31
Hi,
You have to contact your broker, and if your account is from Spotware beta demo then we can do it for you.
Send us an email with your account detail: connect@spotware.com
@Warchlist navigation using keyboard arrows: 21 Jun 2022, 09:26
Hi,
This indicator might help you: Chart Navigator - AlgoDeveloper
@need help: 21 Jun 2022, 09:25
hamijonz said:
amusleh said:
Hi,
You just have to iterate over a data series points with a loop and find the minimum or maximum values.
DateSeries itself has minimum and maximum extension methods:
Minimum Method - cTrader Automate API
Maximum Method - cTrader Automate API
You can also use a for loop or Linq.
Hi, thank you, but I didn't mean that. I want to get it more precisely
And I don't want to get the maximum of ten previous candlesticks, for example, I just want to get the highest previous and the highest two previous ones
For example, I want to say that if the last value of RSI exceeds the previous highest point, open a buy position.
I hope you understand what I mean
Hi,
You can use the DataSeries Maximum / Minimum methods for that, just use Maximum to find the highest value of RSI on x previous bars, then compare it with current RSI value.
@Position volume breakup: 21 Jun 2022, 09:23
Hi,
You can't break a position, but you can check if the position profit reached x pips and then close x% of it's volume.
@Windows Form - TopMost: 21 Jun 2022, 09:22
Hi,
If you open a the window from a detached chart then it will appear behind the chart, if you open the window from an attached chart then it will appear over cTrader main window.
As your indicator / cBot runs from their own process it doesn't know about the cTrader windows so it's not possible for us to change this behavior.
@How do we calculate our overall pip total like cTrader does when we have multiple entries on a position?: 20 Jun 2022, 14:29
firemyst said:
amusleh said:
Hi,
So you are trying to calculate the Pips for positions that are partially closed or added?
If that's what you are looking to do then you can't, because the API doesn't give you the data for partially closed / added positions.
When you close part of a position or add more volume to it the history is not updated until you close the whole position, nor the positions closed / opened events are triggered.
But there's obviously some mathematical formula that's used because cTrader does it.
As I mentioned in my original post, I keep track of each position's volume and entry price that are added (eg, I have my own history), so I should be able to do it before the position is closed just like cTrader.
So, can't you look at cTrader's source code and tell me what formula it's using to do its live calculation? :-)
Thank you.
Hi,
The cTrader Pips column shows the different in Pips between position entry price and current price.
If you add new volume to the position then the entry price of position will change, and for Pips it will use the new entry price.
That's how it's calculated on cTrader, so for:
What I mean by overall pips is if my positions are:
1) 10000 units of EURCAD @ 1.3547
2) 1000 units of EURCAD @ 1.3562
3) 1000 units of EURCAD @ 1.36701
and price is currently at 1.35835
cTrader will use 1.36701 as entry price and 1.35835 as current price, the difference will be position Pips, it doesn't take into account the previous entry prices.
@How do we calculate our overall pip total like cTrader does when we have multiple entries on a position?: 20 Jun 2022, 11:49
Hi,
So you are trying to calculate the Pips for positions that are partially closed or added?
If that's what you are looking to do then you can't, because the API doesn't give you the data for partially closed / added positions.
When you close part of a position or add more volume to it the history is not updated until you close the whole position, nor the positions closed / opened events are triggered.