volatility breakout - futures io
futures io futures trading



volatility breakout


Discussion in EasyLanguage Programming

Updated by ursus
    1. trending_up 806 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 4 replies
    2. attach_file 1 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • 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 and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

volatility breakout

(login for full post details)
  #1 (permalink)
Sydney NSW Australia
 
 
Posts: 9 since Jun 2020
Thanks: 0 given, 1 received

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.

Reply With Quote

 
 
(login for full post details)
  #2 (permalink)
Legendary Market Wizard
Somewhere, Delawhere, USA
 
Experience: Intermediate
Platform: TradeStation,Sierra Chart
Broker: Tradestation Securities
Trading: My kids, VX, Eurodollar
 
vmodus's Avatar
 
Posts: 634 since Feb 2017
Thanks: 1,217 given, 1,204 received


ursus View Post
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.

Please share your EasyLanguage code and let's see what we can do. Also, which version of TradeStation are you using? (9.5, 10, etc.)

~vmodus

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #3 (permalink)
Sydney NSW Australia
 
 
Posts: 9 since Jun 2020
Thanks: 0 given, 1 received


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}

Inputs:
Multiplier(1.0),
Trailing(5),
UTarget(300);

Vars: TriggerRange(0),
GoLongPoint(0),
GoShortPoint(0);

TriggerRange = High - Low;
GoLongPoint = Open of tomorrow + TriggerRange * Multiplier;
GoShortPoint = Open of tomorrow - TriggerRange * Multiplier;


Buy next bar at GoLongPoint stop;
Sellshort next bar at GoShortPoint Stop;

If marketposition = 1 then begin
Sell next bar at lowest(low, Trailing) stop;
SetProfitTarget(UTarget);
End;

If MarketPosition = -1 then begin
Buytocover next bar at highest(high, Trailing) stop;
SetProfitTarget(UTarget);
End;

Reply With Quote
 
(login for full post details)
  #4 (permalink)
Sydney NSW Australia
 
 
Posts: 9 since Jun 2020
Thanks: 0 given, 1 received

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.

Reply With Quote
 
(login for full post details)
  #5 (permalink)
Sydney NSW Australia
 
 
Posts: 9 since Jun 2020
Thanks: 0 given, 1 received

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.


Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > volatility breakout


June 25, 2020


Upcoming Webinars and Events
 

Every journal equals ten meals for the hungry

Now
     



Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts