Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 984 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to handle TakeProfit via MT4 bridge #484858
12/19/21 19:40
12/19/21 19:40
Joined: Dec 2021
Posts: 12
Z
Zendrix Offline OP
Newbie
Zendrix  Offline OP
Newbie
Z

Joined: Dec 2021
Posts: 12
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

Re: How to handle TakeProfit via MT4 bridge [Re: Zendrix] #484862
12/20/21 14:47
12/20/21 14:47
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
You cannot see a takeprofit in mt4. And the stop youre seeing is also not the real stop. MT4 won't know your exit conditions.

http://manual.zorro-project.com/stop.htm

Re: How to handle TakeProfit via MT4 bridge [Re: Zendrix] #484864
12/20/21 15:18
12/20/21 15:18
Joined: Dec 2021
Posts: 12
Z
Zendrix Offline OP
Newbie
Zendrix  Offline OP
Newbie
Z

Joined: Dec 2021
Posts: 12
Hello Spirit,
thank you for your help - I found the passus.
Thank you !


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1