No, because the API documentation clearly states, “Shortcut for Robot.ModifyPosition method to change the Stop Loss.” and “ModifyPosition” is not asynchronous.
Also, all their current API calls that work asynchronously are labelled as being asynchronous, such as “ModifyPositionAsync” and “ModifyPendingOrderAsync”.
If you need/want to modify the stop loss asynchronously, you'll probably want to use “ModifyPositionAsync”. Yes, that means you're going to have to provide all the required parameters, which you should be able to gather most of the information from your current position.
Ex:
var position = Positions.Find("myLabel", Symbol, TradeType.Buy);if (position != null) ModifyPositionAsync(position, position.StopLoss.GetValueOrDefault() + (Symbol.PipSize * 10), position.TakeProfit);
“ModifyPositionAsync”is obsolete,I'm doubting if there is “Async” in the new version grammar,if not,it will take such a long time to modify a large number of orders.
Hello , I've been experiencing this too for around 3 days now
it happens when Algo tries to sync, it can only do the first sync when you open the software, then is never able to reconnect and gets stuck The only solution is restarting over and over
When the price of US30 is 40,000, I buy US30 using ExecuteMarketRangeOrderAsync(TradeType.Buy, US30, lot, 10, Symbol.Ask + 100, MyLabel, stopLoss, stopLoss * 10, comment); my base price should be 40,100, and the range pips are 10 points. In theory, the transaction should only be executed when the ask price reaches 40,099 or 40,101, but in practice, it is executed immediately. Why is this RANGE restriction ineffective?
Hi there,
No, this is not how it works. Market orders are executed immediately. This is way they are called market orders. If you need a pending order use a Stop Limit order.
Best regards,
Panagiotis
thank you for replying!
The issue I'm encountering is: when placing an market order, marketrangepips can limit negative slippage , but it doesn't limit positive slippage. For example, when I'm buying, the price at the time of order placement is 40,000, and the marketrangepips is set to 10. However, if the price suddenly drops to 4, which is very favorable to me, so it filled at 4, I don't want the order to be executed. It should only be executed within the range allowed by marketrangepips. Does the marketrangepips parameter only limit negative slippage, or does it limit both positive and negative slippage? What I want is that the positive slippage can also be limited though the price is favorable to me, this function can prevent potential reversal after sending an maket order at exceptionally active market conditions
Market range only limits negative slippage.
Is it possible to implement a function to limit positive slippage?thank you.
Hi there,
You can suggest it in Suggestions. Nevertheless I don't think it would be a popular suggestion as I personally do not see the reason of limiting positive slippage. I can't think why you would not want a better price for your order. It's like rejecting a discount for a product and insisting to pay the actual price.
Best regards,
Panagiotis
thank you for replying!
Take US30 for example, my stoploss is usually set to 1.7 point(very tiny), so any price reversal more than 1.7 means it's beyond my stoploss, it's not the price I want. the trend is reversed. so I have to close the position, so in order to avoid this case, the order should only be executed within some positive range(range<=1.7),or worse range(limited by slippage), better never allow it to fill if beyond the positive range.
When the price of US30 is 40,000, I buy US30 using ExecuteMarketRangeOrderAsync(TradeType.Buy, US30, lot, 10, Symbol.Ask + 100, MyLabel, stopLoss, stopLoss * 10, comment); my base price should be 40,100, and the range pips are 10 points. In theory, the transaction should only be executed when the ask price reaches 40,099 or 40,101, but in practice, it is executed immediately. Why is this RANGE restriction ineffective?
Hi there,
No, this is not how it works. Market orders are executed immediately. This is way they are called market orders. If you need a pending order use a Stop Limit order.
Best regards,
Panagiotis
thank you for replying!
The issue I'm encountering is: when placing an market order, marketrangepips can limit negative slippage , but it doesn't limit positive slippage. For example, when I'm buying, the price at the time of order placement is 40,000, and the marketrangepips is set to 10. However, if the price suddenly drops to 4, which is very favorable to me, so it filled at 4, I don't want the order to be executed. It should only be executed within the range allowed by marketrangepips. Does the marketrangepips parameter only limit negative slippage, or does it limit both positive and negative slippage? What I want is that the positive slippage can also be limited though the price is favorable to me, this function can prevent potential reversal after sending an maket order at exceptionally active market conditions
Market range only limits negative slippage.
Is it possible to implement a function to limit positive slippage?thank you.
When the price of US30 is 40,000, I buy US30 using ExecuteMarketRangeOrderAsync(TradeType.Buy, US30, lot, 10, Symbol.Ask + 100, MyLabel, stopLoss, stopLoss * 10, comment); my base price should be 40,100, and the range pips are 10 points. In theory, the transaction should only be executed when the ask price reaches 40,099 or 40,101, but in practice, it is executed immediately. Why is this RANGE restriction ineffective?
Hi there,
No, this is not how it works. Market orders are executed immediately. This is way they are called market orders. If you need a pending order use a Stop Limit order.
Best regards,
Panagiotis
thank you for replying!
The issue I'm encountering is: when placing an market order, marketrangepips can limit negative slippage , but it doesn't limit positive slippage. For example, when I'm buying, the price at the time of order placement is 40,000, and the marketrangepips is set to 10. However, if the price suddenly drops to 4, which is very favorable to me, so it filled at 4, I don't want the order to be executed. It should only be executed within the range allowed by marketrangepips. Does the marketrangepips parameter only limit negative slippage, or does it limit both positive and negative slippage? What I want is that the positive slippage can also be limited though the price is favorable to me, this function can prevent potential reversal after sending an maket order at exceptionally active market conditions
Can you provide a better explanation of the problem? What do you mean when you say “is too large”? How can we see this?
Best regards,
Panagiotis
The longer the horizontal bar in the red box, the fewer the number of candlesticks in the chart, and the shorter, the more. The short one represents the M1 chart, which has too many candle sticks. I hope it could be like a range chart, where more K-line data is downloaded only when you drag it to the left. Without dragging, only a part of the candle sticks are displayed. The number of candle sticks in the M1 chart is very large when the software is opened. I hope it could be as few as the range chart. When I want to see more data, I can just drag it to left.
Hi there,
There is no way to reduce the number of loaded bars at the moment. However I cannot reproduce any delays. Can you provide more information? Can you record a video where we can see what you are experiencing?
Best regards,
Panagiotis
There is a delay in data reception(MT4 or MT5 is faster),I thought it might be the historical data caused the problem. I can record a video, but uploading video is not allowed here,only pictures can be uploaded
Can you provide a better explanation of the problem? What do you mean when you say “is too large”? How can we see this?
Best regards,
Panagiotis
The longer the horizontal bar in the red box, the fewer the number of candlesticks in the chart, and the shorter, the more. The short one represents the M1 chart, which has too many candle sticks. I hope it could be like a range chart, where more K-line data is downloaded only when you drag it to the left. Without dragging, only a part of the candle sticks are displayed. The number of candle sticks in the M1 chart is very large when the software is opened. I hope it could be as few as the range chart. When I want to see more data, I can just drag it to left.
I used to use Copier and cMAM, but they have internet latency,Multi-account terminal is different from Trade Copier or cMAM, I can NOT afford any latency,I am High frequency trader
910247359
20 Dec 2021, 10:36
( Updated at: 20 Dec 2021, 10:40 )
RE: MT4 expert code to cTrader
@algodeveloper
re:Ahmad Noman Musleh
would you plz tell me your email address or would you send me an email at 910247359@qq.com, I want give you my whole cBot souce code which is almost done, and you can work it out , this is the MT4 trading panel i use, I hope you can realize it in the cTrader, perhaps it's also usful to your trade
910247359
25 Dec 2024, 19:58
RE: Modifying grammar doubt
firemyst said:
“ModifyPositionAsync”is obsolete,I'm doubting if there is “Async” in the new version grammar,if not,it will take such a long time to modify a large number of orders.
@910247359