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)
Guys, I am stuck. I don't know if this version of TS is so different from i2000, but for the life of me I cannot get this to work.
I am trying to code the following strategy:
Enter long at today's open + yesterday's high - low;
Trailing stop - low of previous bar;
Profit target 50 pips;
For some reason I can only get the platform to buy at today's close + today's range. I guess for forex today's open is the same as yesterday's close, so that should be ok.
I am using SetProfitTarget function to for the profit stop - but I am not sure how to set it up with both long and short trades. Does it automatically assume the appropriate market position?
I am coding this based on daily bars. Should I try lower time frame instead?
I don't expect hand holding and being handed out the solution, but every advice will be highly appreciated.
Can you help answer these questions from other members on NexusFi?
I think I cried for help too soon. Anyway, below is the code for the strategy. Pretty self explanatory. results are not impressive on currencies.
{Larry Williams volatility breakout strategy.
Long entry: open + yesterday's range * multiplier
Short entry: open - yesterday's range * multiplier
Exits: Profit target and trailing stop on n bars high/low}
This strategy seems to have pretty wild equity fluctuations. It doesn't do very well in times of low volatility. I am going to play with volatility filters.
And now I stumbled on couple of other problems. I can apply this strategy to some pairs but not others. It works with AUDUSD with no issues, but on USDCHF doesn't generate any trades. Am I overlooking something?
Also, sometimes the strategy executes profit taking in a strange way: at the same level as entry, as illustrated on the second trade in the screenshot below. Apparently using the function SetProfitTarget should take care of it, but it appears not always.
It appears that your profit target is too small relative to the overall bar range. Try set the "inside-bar" to 1min (turned off by default) in Tradestation.
The online help is your best friend. Look for 'Buy' in the TradeStation Development Environment Dictionary and you will find some examples.
Also, open some of the sample strategies they provide, so you should have a good starting point. It seems like you want your entries to be stop orders (not sure). For trailing stops, look at this strategy to get started: _Stops & Targets