Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
6 registered members (TipmyPip, Niels, dBc, Ed_Love, 3run, 1 invisible), 17,577 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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: 594
Austria
Petra Offline
Support
Petra  Offline
Support

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