I am brand new at wealth lab and was hoping I could get help programming my strategy so I can start trading. The strategy is pretty simple. I need the following criteria met in order to have a buy alert: 1. 20 day moving average above 50 day moving average
2. 4 down days followed by a narrow range day
3. then get a buy signal if stock breaks above narrow range days high
4. once bought get sell signal if stock breaks below narrow range day or if stock breaks above high of first down day.
I am really new to wealth lab and would appreciate any help you can give to get this strategy going
Size:
Color:
First thing to learn about is the Strategy Builder. See User Guide: Strategy Window > Strategy Builder
The idea is that you can get at least a good start on simple strategy rules, just using drag and drop:
Which produces this Strategy code:
CODE:
Please log in to see this code.
Now, we can add the rest of the rules, but you need to define "narrow range day".
Size:
Color:
quarter of the size of the average day?
Size:
Color:
Well, the specifications are inexact since you didn't define the order types, if you wanted to enter on a stop, or exit after a close, etc. But here's one idea (below). Paste it in a Strategy Window, Compile, Save it, and execute it on a large DataSet - you'll need lots of opportunities to find a stock that meets these entry conditions. You can play with the sliders to adjust some of the parameters. Have fun experimenting!
CODE:
Please log in to see this code.
Size:
Color:
A market order is fine if the stock brakes above the narrow range days high to get into trade. It is also ok for a buy or sell at market to get out of trade if it brakes low of narrow range day or brakes high of first day down. Thanks for the help. Can you walk me through how to get this into the wealth lab for test and then how do I use it live to give me alerts?
Size:
Color:
I am having trouble getting it into wealth lab it keeps pasting whole thing on 1 line, have you ever seen that before.
Size:
Color:
That's a IE thing. Copy/paste works fine with all other browsers e.g. Firefox or Chrome.
Workaround if you have to stick with IE: copy to Wordpad, copy from Wordpad, paste to WL. Voila.
Size:
Color:
I backtested the strategy and it only found 2 trades in the S&P 500 all the way back to 1991. If I go through the charts however I see stocks that meet my criteria.
Can you please help me try to figure out what went wrong?
I need 4 down days, then a narrow range day and then the stock needs to break the high of the narrow range day to give a buy signal. The sell signals would be a break of the narrow range day low or if the stock moves back up above the high of the first down day.
Size:
Color:
CODE:
Please log in to see this code.
Which ones and what dates?
Size:
Color:
BAC last couple of weeks
Size:
Color:
Well, no, it does not meet your "narrow range bar" criteria. But if you move the "Narrow Range" slider to 0.55 or greater, then you'll start seeing some trades.
Size:
Color:
Thank you. How do I change the "Narrow Range" slider to .55. Sorry I am very new.
Size:
Color:
Check out Reference > Data Panel > Strategy Parameters in the Wealth-Lab User Guide (Help menu).
Size:
Color:
I am really sorry but I dont understand what your saying. Do I need to change something in the programming? I cant find reference or data panel?
Size:
Color:
I was suggesting that you find the User Guide under the Help menu, expand "Reference", then "Data Panel", and click on "Strategy Parameters" to read the manual on how to change parameter values in Wealth-Lab.
With your Strategy open, on the left side of the Wealth-Lab's workspace, below the DataSets tree, can you see a little white box with the bluish labels: "Fast Period", "Slow Period", "Number of Bars", "Narrow Range"?
Size:
Color:
yes I see it and changed it to .55 hopefully that will help. Thanks for the help
Size:
Color:
It keeps reverting back to .25 when I open strategy instead of .55
Size:
Color:
I'd suggest you review the chapter on strategy parameters. Saving is explained there.
Size:
Color: