Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/20/24 06:09
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (henrybane, flink, Edgar_Herrera), 726 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
2 trades, 2 TP, 2 SL #461874
08/26/16 19:33
08/26/16 19:33
Joined: Feb 2014
Posts: 73
Montreal, Qc Canada
F
Finstratech Offline OP
Junior Member
Finstratech  Offline OP
Junior Member
F

Joined: Feb 2014
Posts: 73
Montreal, Qc Canada
Hi,

I'm trying to elegantly write a piece of code for:

Enter a buy and a sell at the same time, but have different TP and SL for both.
How would you go about it?
Thanks laugh

Last edited by Finstratech; 08/26/16 19:35.
Re: 2 trades, 2 TP, 2 SL [Re: Finstratech] #461876
08/27/16 07:24
08/27/16 07:24
Joined: Apr 2008
Posts: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
Set them before the trade, or use function parameters.

enterLong (0,0,Stop1,TP1);
enterShort (0,0,Stop2,TP2);

Re: 2 trades, 2 TP, 2 SL [Re: Petra] #461908
08/28/16 22:15
08/28/16 22:15
Joined: Feb 2014
Posts: 73
Montreal, Qc Canada
F
Finstratech Offline OP
Junior Member
Finstratech  Offline OP
Junior Member
F

Joined: Feb 2014
Posts: 73
Montreal, Qc Canada
This is short and sweet.

Thank you.

Last edited by Finstratech; 08/28/16 22:15.

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1