How modify TP of multiple orders on one pair
How modify TP of multiple orders on one pair
09 Nov 2015, 01:34
Hi,
Is there any way to modify TP(target) or SL (Stop loss) of multiple orders on one pair at same time? in MT4 there was script that when i drop the script in any price of chart all orders change TP to that point and another script to change SL to any price i click
Replies
fahdjeddah
09 Nov 2015, 22:44
RE:
Spotware said:
Dear Trader,
You could loop through all positions with the same symbol and modify the TP or SL. The following code snippet loops though all positions and if the Symbol of the position is EURUSD it prints the word "Hello" in the log.
foreach (var position in Positions) { if (position.SymbolCode == "EURUSD") { Print("hello"); } }
Thank you .
can you please me show me these point:
what code or function i have to use to change the TP to place i click by mouse?
@fahdjeddah
Spotware
10 Nov 2015, 15:26
Dear Trader,
To modify an order you use the ModifyPendingOrder method.
We recommend you to have a look at the API Programmers Guides section of cTDN.com
@Spotware
Spotware
09 Nov 2015, 17:59
Dear Trader,
You could loop through all positions with the same symbol and modify the TP or SL. The following code snippet loops though all positions and if the Symbol of the position is EURUSD it prints the word "Hello" in the log.
@Spotware