How are Multiple SellAtLimits handled by WL time &
Author: zanek
Creation Date: 8/3/2009 8:35 PM
profile picture

zanek

#1
I kind of asked this question before, but I'm not sure if I asked this precise/specific question.

If I have the following code:

CODE:
Please log in to see this code.


Does WealthLab try to sell at the highest price first, then the higher price, then the medium price, and if all of those fail, sell at market ?

Also, how long does it try to sell at each of those limits during the next bar ? Does WL try to sell at the limit immediately and if it fails, returns to try the next limit sell and so on ?

profile picture

Eugene

#2
This construction can lead you to inflated results because of peeking. The AtMarket order should precede all the rest.

For more, see the WealthScript Programming Guide, Programming Trading Strategies > Peeking > Order of Trading Signals.
profile picture

BigReturns

#3
Just a thought...

As a developer, I would think WL could internally handle this by queuing all SELL orders and prioritizing them?

Use it like a transaction.... something like this:

CODE:
Please log in to see this code.


SELL orders within the transaction are first prioritized on their type then the order which they were entered.

Obviously, I don't have access to the internal code, but I would think its possible and a great way to handle this concept that comes up over and over while not affecting the flexibility the system has.

(Again, just an idea / suggestion)

-Derek
profile picture

Cone

#4
The wizard will prioritize the exits (in V5), but code should execute as it's written. That's not going to change.
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).