2 trades, 2 TP, 2 SL

Posted By: Finstratech

2 trades, 2 TP, 2 SL - 08/26/16 19:33

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
Posted By: Petra

Re: 2 trades, 2 TP, 2 SL - 08/27/16 07:24

Set them before the trade, or use function parameters.

enterLong (0,0,Stop1,TP1);
enterShort (0,0,Stop2,TP2);
Posted By: Finstratech

Re: 2 trades, 2 TP, 2 SL - 08/28/16 22:15

This is short and sweet.

Thank you.
© 2024 lite-C Forums