Setting priority for an AtLimit order (LDL strategy)
Author: Carloseta
Creation Date: 10/31/2010 4:41 PM
profile picture

Carloseta

#1
I'm trying to add parts of 2 scripts together but I'm getting a host of errors.
Any help is welcome.


Trying to add this ROC code:

CODE:
Please log in to see this code.


to the LDL2 script

CODE:
Please log in to see this code.

profile picture

Eugene

#2
There are 2 different entries, AtMarket and AtLimit. How exactly do you plan to merge/combine these parts? Replace the LDL entry with that ROC code, or take a new Position once the condition is true?
profile picture

Carloseta

#3
I wan to keep the LDL limit but have priority given to the highest ROC.
profile picture

Eugene

#4
To quote the WealthScript Programming Guide:
QUOTE:
Generally speaking, Position.Priority is difficult to apply when backtesting end-of-day stop and limit Strategies. That's because the actual trade sequence should be prioritized by the time of day at which the actual price attains the order price.

So you may want to look at one of these solutions:

Setting Priority for AtStop/AtLimit Orders
profile picture

07nioe

#5
Hi Eugene, could you give an example for the LimitPriorityLong method? Thank you.
profile picture

Eugene

#6
Hi Niels,

CODE:
Please log in to see this code.


From what I recall, author has replaced the method with IntradayFillPriorityEstimate so it's advised to use that method instead.
profile picture

07nioe

#7
Thank you very much, Eugene. As I don't have intraday data, I cannot appy the replaced approach. But it should be the next step of the project. :-)
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).