Page 1 of 5

Entry Order Strategy

PostPosted: Tue Sep 17, 2013 5:21 am
by Apprentice
Entry Order Strategy.png

Will generate an Entry order, X pips above or below market.
At future set point in time.
Entry Order Strategy.lua
(11.89 KiB) Downloaded 2312 times


The Strategy was revised and updated on January 21, 2019.

Re: Entry Order Strategy

PostPosted: Mon Nov 25, 2013 10:49 pm
by lucypip
Hi Apprentice! can you make this available on OCO (one cancels other), Market Order, and Market Range please. Thanks!!!

Re: Entry Order Strategy

PostPosted: Tue Nov 26, 2013 5:11 am
by Apprentice
will consider it.
Can I, and how to achieve this.

Re: Entry Order Strategy

PostPosted: Mon Jan 06, 2014 5:30 am
by axeas69
Hi Apprentice,
Can you add these points?
at the European open (9.00 a.m as parameter) eur/usd to buy (parameter) 11 pips (parameter) under the opening price, and to sell at 25 pips (parameter) over. Both orders have an attached stop loss 12 pips (parameter) away, and a take profit order 39 pips (parameter) away.
(other sample: at 9.15 a.m GER30 to buy 17 points above the opening price, and to sell at 10 pips under. Both orders have an attached stop loss 11 pips away, and a take profit order 35 pips away.)
In this way, we can do a lot of backtest.
Thank's in advance. WKR Axeas69

Re: Entry Order Strategy

PostPosted: Mon Jan 06, 2014 7:09 am
by axeas69
Sorry, I forgot 2 conditions about validity of the 2 OCO.
1- Validity up to 8.00a.m N+1
2- option to cancel the second OCO if the first is started.

Many Thanks. Axeas69

Re: Entry Order Strategy

PostPosted: Mon Jan 06, 2014 12:16 pm
by lucypip
Apprentice wrote:will consider it.
Can I, and how to achieve this.


Thanks apprentice. I've got this strategy working but I think OCO would be better. I dont know exactly how to encode this. I think it has something to do with valuemap. Change the "OM" to "OCO" or something like that. I dont really what else should be change.

valuemap.Command = "CreateOrder";
valuemap.OrderType = "OM";
valuemap.GTC = "FOK";

ContingencyID
--OCO, OTO, ELS

ContingencyType
0 not included in contingency group
1 part of OCO
2 OTO --use OrderIdPrimary
3 ELS --use OrderIdPrimary

Re: Entry Order Strategy

PostPosted: Tue Jan 21, 2014 2:25 am
by axeas69
Hello,
There is a bug in backtestinf. The strategy stop to work after to create the first order.
Please can you check? Thanks in advance WKR Axeas

Re: Entry Order Strategy

PostPosted: Tue Jan 21, 2014 3:36 am
by Apprentice
Termination of strategy after the execution is intentional.
This functionality will remain.

OCO version, on the other hand should be run indefinitely.

Re: Entry Order Strategy

PostPosted: Sat Jan 25, 2014 4:38 pm
by axeas69
Hi,
I'm sorry to disturb you again.I check everywhere and everything but I don't understand
where I can put OCO to get the other version and see the backtest run up to the end of the period.
Thanks in advance. WKR Axeas

Re: Entry Order Strategy

PostPosted: Mon Jan 27, 2014 3:44 am
by Apprentice
Unfortunately this is not so simple, existing strategy, should be modified.