Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Sellshorts if the price hits the upper band,
covers if the price closes under the mid band,
buys if the price hits the low band,
sells if the price closes over the mid band.
The first thing I see is the use of currentbar. Currentbar gives you the current bar count. Probably getting some interesting results with that one. You want to use "close" instead.
There are some interesting ways you can generate orders here. Tradestation runs a strategy once per bar, unless you have intrabarordergeneration turned on (which I highly suggest you stay away from). So on a daily bar it will only run the strategy once per day, but that doesn't mean you can't generate orders that might fill intraday. For instance, instead of waiting for a close outside a BB, you could use a limit order to fill at the BB which may hit intraday.
Alternatively on the exit, waiting for a close above the mid could be exchanged for a stop order at the mid once you are in a trade. Therefore it would fill intraday. Also if you set this kind of order when you fill your entry conditions it can trigger the same day. Meaning, currently if you fill a buy and the price climbs above the mid in the same day, you will not exit until tomorrow. With a stop placed at the same time as the buy you could exit in the same bar.