Multiple position OCO

Strategies are published here.

Multiple position OCO

Based on the request.
viewtopic.php?f=27&t=65762

OCO will be capable of opening multiple positions at the same time with different lot sizes, stops & limits.

multi_oco.lua

Apprentice
FXCodeBase: Confirmed User

Posts: 20873
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Multiple position OCO

Hi Apprentice,

This looks great. Basically, it looks like we have a Multiple Entry/ Multiple Exit (ME/ME) basket type of Strategy. Exits are either by variable SLs, TPs or opening an Entry in the opposite direction via OCO at the predetermined level. This is exactly what I had hoped for.

I do not know if it would be possible with the OCO logic to specify which Side to Trade for the basket, or do we just have to set the opposite side at a Level far enough away to avoid getting hit by a wild spike?

Many thanks as always, AG

amazon1a

Posts: 80
Joined: Wed Oct 05, 2011 10:47 am

Re: Multiple position OCO

Can you give me an actual example of such a trade?

Apprentice
FXCodeBase: Confirmed User

Posts: 20873
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Multiple position OCO

For example, for the past month for the CADJPY the side to have been on was the Short side. At almost any Level a basket short would have been in profit, and we would not have wanted Long trades triggered. If that was our BIAS then Long positions by OCO would need to be far away.

I know that once open, we can go back and delete opposing orders, but that is a bit of a bother and for me so prone to error.

The PartialAmountStrategy( viewtopic.php?f=31&t=64940&hilit=partialamountstrategy) has a provision to select a side but not both. Maybe something along these lines might be possible with the option to chose Long, Short or Both to preserve the original OCO function.

I am thinking the choice would apply for the whole 5 Trade basket - not each Trade separately.

But please know that I am very happy with what I have, and this Tweak may be too much.

AG

amazon1a

Posts: 80
Joined: Wed Oct 05, 2011 10:47 am