Good evening,
I have got a problem using the MT4 Bridge, maybe someone can advise me what I am doing wrong. I am not able to place a TakeProfit target to the MT4 Terminal via the Zorro MT4 Bridge.
I am able to enter and exit trades in both directions via MT4 Bridge, all works fine using the enterLong() enterShort() commands, and it works also fine calling TMF for handling a trade :
(…)
algo("TEST_A");
asset(ASSET_A);
Stop = 0.01;
enterLong();
(…)
…works fine, trade is opened acc. the asset-List, 0.01Lots long EUR/USD with StopLoss@0.01 Distance. The MT4 Expert-Log shows opening of trade first, in sequence : trade-modification by adding the requested stop loss. The same successful operation, when opening the trade via a user-TMF-function, using the
(…)
TradeStopLimit=TradePriceOpen*0.99
(…)
command in TMF as absolut stop-value instead of stop-distance. The MT4-Terminal-Expert-Log shows same, trade-opening followed by trade-modification by stop loss placement.
BUT, if I try to use the same code with added take profit values, nothing happens.
(…)
algo("TEST_A");
asset(ASSET_A);
TakeProfit = 0.01; //////<===
Stop = 0.01;
enterLong();
(…)
This code „only“ opens the trade and adds the stop loss, but nothing on take profit.
Same behavior via TMF using
(…)
TradeProfitLimit=TradePriceOpen*1.01;
(…)
There is no error message presented by Zorro, and no MT4-Terminal-Error-Message in Experts or Journal. It seems, as if there is no request regarding take profit presented to the MT4 Terminal.
When the trade is opened by Zorro, I can manually add the take profit to the running Zorro-trade, so the possibility having a take profit is available. I tried two brokers with separate Terminals, FXpro and Roboforex - both brokers same behavior as described above.
Can someone give me a hint what I am doing wrong ?
Regards
Hendrix