Simple Buy& Sell @ limit $ script
Author: takacsjt
Creation Date: 2/23/2011 6:57 PM
profile picture

takacsjt

#1
Hello, I'm new to using WLP and was wondering if the tool offers a means to write a simple buy & sell @ a defined limit $ value and an option to repeat up to a defined # or trades per day. Does it offer this capability or are there any existing strategies that you could refer me to?
profile picture

Eugene

#2
Hello,

Yes, in WLP's Rule Wizard ("New Strategy From Rules") there's a Condition in the Position-based group called "Number of open positions is less than a value". Check "Multiple open positions allowed" at the bottom of the Conditions tab, drag that Condition to your limit-based entry, and you have the entry rule that you described.
profile picture

takacsjt

#3
Thanks. So I've gotten some traction related to the basics. I would think my rules below would accommodate buying @ a define $ value and selling at a defined profit %.

Assumption that if I inputted Scale = Daily, Raw Profite Mode: Fixed Dollar selected.
What would I have to add/tweak to my example below if I were looking to have the strategy operate as follows: buying XXqty @ $ limit and sell at profit target % XX and have the strategy repeat XX times a day?


Buy at Limit
Number of open positions is less than a value
Price is below a value
Sell at Profit Target (%)

Eugene, your expertise is greatly appreciated.

Jon
profile picture

Eugene

#4
QUOTE:
Assumption that if I inputted Scale = Daily, Raw Profite Mode: Fixed Dollar selected.
What would I have to add/tweak to my example below if I were looking to have the strategy operate as follows: buying XXqty @ $ limit and sell at profit target % XX and have the strategy repeat XX times a day?

This idea comes up every month so I'm going to add this to our Wiki FAQ immediately.

Assuming Daily data (and any other bar scale), you can't realistically backtest with stop and limit orders on the same bar. What you reliably know is:

1. that the open occurred before all the other prices and
2. that the close occurred the last.

Without looking inside the bar on a smaller time frame, the order in between is unknown -- that's why the backtest results shouldn't be trusted and can be inflated. That's what not to do but what to do then?

To avoid inadvertent peeking into the future when dealing with several stop/limit signals appearing on the same bar, apply a workaround:

* WealthScript Programming Guide: Techniques > Most Probable AtStop
* Community Components library: Setting Priority for AtStop/AtLimit Orders (requires intraday data)
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).