Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, 7th_zorro, VoroneTZ, Quad), 901 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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: 586
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 586
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