Entry Order Strategy

Strategies are published here.

Moderator: admin

Entry Order Strategy

Postby Apprentice » Tue Sep 17, 2013 5:21 am

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 1442 times
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 17385
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Entry Order Strategy

Postby lucypip » Mon Nov 25, 2013 10:49 pm

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

Re: Entry Order Strategy

Postby Apprentice » Tue Nov 26, 2013 5:11 am

will consider it.
Can I, and how to achieve this.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 17385
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Entry Order Strategy

Postby axeas69 » Mon Jan 06, 2014 5:30 am

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
axeas69
 
Posts: 10
Joined: Mon Jan 06, 2014 4:57 am

Re: Entry Order Strategy

Postby axeas69 » Mon Jan 06, 2014 7:09 am

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
axeas69
 
Posts: 10
Joined: Mon Jan 06, 2014 4:57 am

Re: Entry Order Strategy

Postby lucypip » Mon Jan 06, 2014 12:16 pm

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
lucypip
 
Posts: 2
Joined: Mon Nov 25, 2013 10:33 pm

Re: Entry Order Strategy

Postby axeas69 » Tue Jan 21, 2014 2:25 am

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
axeas69
 
Posts: 10
Joined: Mon Jan 06, 2014 4:57 am

Re: Entry Order Strategy

Postby Apprentice » Tue Jan 21, 2014 3:36 am

Termination of strategy after the execution is intentional.
This functionality will remain.

OCO version, on the other hand should be run indefinitely.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 17385
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Entry Order Strategy

Postby axeas69 » Sat Jan 25, 2014 4:38 pm

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
axeas69
 
Posts: 10
Joined: Mon Jan 06, 2014 4:57 am

Re: Entry Order Strategy

Postby Apprentice » Mon Jan 27, 2014 3:44 am

Unfortunately this is not so simple, existing strategy, should be modified.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 17385
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Next

Return to Custom Strategies

Who is online

Users browsing this forum: No registered users and 4 guests