Need EasyLanguage help with HighD(1) - futures io
futures io



Need EasyLanguage help with HighD(1)


Discussion in TradeStation

Updated
      Top Posters
    1. looks_one 10handles with 4 posts (0 thanks)
    2. looks_two kevinkdog with 3 posts (1 thanks)
    3. looks_3 DeanJ with 1 posts (1 thanks)
    4. looks_4 ABCTG with 1 posts (1 thanks)
    1. trending_up 1,879 views
    2. thumb_up 3 thanks given
    3. group 3 followers
    1. forum 8 posts
    2. attach_file 1 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,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
 

Need EasyLanguage help with HighD(1)

(login for full post details)
  #1 (permalink)
 10handles 
San Francisco CA
 
Experience: Beginner
Platform: TradeStation
Trading: Options
 
Posts: 10 since Apr 2014
Thanks: 4 given, 2 received

I'm trying to create a simple strategy to enter long on an intraday close over yesterday's high. This code is returning long entries below the prior day's high. Any ideas why?

If close > HighD(1) then buy next bar at market;

Thank you.

Started this thread Reply With Quote

Journal Challenge April 2021 results (now extended!):
Competing for $1800 in prizes from Jigsaw
looks_oneMaking a Living with the Microsby sstheo
(392 thanks from 41 posts)
looks_twoSalao's Journalby Salao
(89 thanks from 15 posts)
looks_3Learning to Profit - A journey in algorithms and optionsby Syntax
(60 thanks from 19 posts)
looks_4Deetee’s DAX Trading Journal (time based)by Deetee
(51 thanks from 25 posts)
looks_5Maybe a little bit different journalby Malykubo
(37 thanks from 23 posts)
 
Best Threads (Most Thanked)
in the last 7 days on futures io
The Crude Dude Oil Trading System
108 thanks
Seasonal Trades
31 thanks
Spoo-nalysis ES e-mini futures S&P 500
24 thanks
futures io site changelog and issues/problem reporting
24 thanks
Cryptocurrencies 101 -- what Ive learned so far
22 thanks
 
(login for full post details)
  #2 (permalink)
 kevinkdog   is a Vendor
 
 
Posts: 2,990 since Jul 2012
Thanks: 1,592 given, 5,942 received


10handles View Post
I'm trying to create a simple strategy to enter long on an intraday close over yesterday's high. This code is returning long entries below the prior day's high. Any ideas why?

If close > HighD(1) then buy next bar at market;

Thank you.

Can you show an example where this is not working as you expect?

Maybe you want this: If close > HighD(1) then buy next bar at HighD(1) limit;

Follow me on Twitter Reply With Quote
 
(login for full post details)
  #3 (permalink)
 10handles 
San Francisco CA
 
Experience: Beginner
Platform: TradeStation
Trading: Options
 
Posts: 10 since Apr 2014
Thanks: 4 given, 2 received



kevinkdog View Post
Can you show an example where this is not working as you expect?

Maybe you want this: If close > HighD(1) then buy next bar at HighD(1) limit;

Thanks Kevin. That didn't solve the problem. Here's a screenshot. Yellow lines are prior session high.


Started this thread Reply With Quote
 
(login for full post details)
  #4 (permalink)
 kevinkdog   is a Vendor
 
 
Posts: 2,990 since Jul 2012
Thanks: 1,592 given, 5,942 received


10handles View Post
Thanks Kevin. That didn't solve the problem. Here's a screenshot. Yellow lines are prior session high.



Trade 2 is doing exactly what it is supposed to: If the close at end of day is greater than the previous high, then buy at the open of the next bar. The decision to buy is made at the close of the day, regardless of a gap down at the start of the next day.

What about "if open next bar > highd(1) then buy this bar at market" or "if open next bar > highd(1) then buy this bar at close" (I did not test, you'll have to check this)

Follow me on Twitter Reply With Quote
 
(login for full post details)
  #5 (permalink)
 DeanJ 
St Louis MO
 
Experience: Intermediate
Platform: tradestation
Trading: stocks
 
Posts: 4 since May 2011
Thanks: 0 given, 1 received

I think all 3 trades are doing what they are supposed to do. Your statement close>HighD(1) says at the close of any bar, whether it is at the end of the day or in the middle of the day, if the close of that bar is higher than yesterday's High it is supposed to buy on the next bar. Doesn't matter if the next bar is the middle of the day or it is the first bar on the next day.

Reply With Quote
The following user says Thank You to DeanJ for this post:
 
(login for full post details)
  #6 (permalink)
 ABCTG   is a Vendor
 
 
Posts: 2,239 since Apr 2013
Thanks: 417 given, 1,490 received

10handles,

you might want to exclude the last bar of each session from triggering trades, as the fill will occur on the next session. You can either use an input or a fixed time like "if Time < 1600" or use the SessionEndTime reserved word to get the end time for the particular session.

Regards,
ABCTG


10handles View Post
Thanks Kevin. That didn't solve the problem. Here's a screenshot. Yellow lines are prior session high.



Follow me on Twitter Reply With Quote
The following user says Thank You to ABCTG for this post:
 
(login for full post details)
  #7 (permalink)
 10handles 
San Francisco CA
 
Experience: Beginner
Platform: TradeStation
Trading: Options
 
Posts: 10 since Apr 2014
Thanks: 4 given, 2 received

Thank you Kevin, ABCTG and Dean.

Yes the last bar was causing the problem. The workaround I used for now is to add "If marketposition = 0" as a condition since I have it send to exit at the end of the session.

I know very little about EL/coding so it will take me some time to figure out how to exclude the last bar of each session but that is probably the better solution since I may want to explore a different exit strategy then session end.

Best regards.

Started this thread Reply With Quote
 
(login for full post details)
  #8 (permalink)
 kevinkdog   is a Vendor
 
 
Posts: 2,990 since Jul 2012
Thanks: 1,592 given, 5,942 received


10handles View Post
Thank you Kevin, ABCTG and Dean.

Yes the last bar was causing the problem. The workaround I used for now is to add "If marketposition = 0" as a condition since I have it send to exit at the end of the session.

I know very little about EL/coding so it will take me some time to figure out how to exclude the last bar of each session but that is probably the better solution since I may want to explore a different exit strategy then session end.

Best regards.


Simple. Say the time of the last bar of the day is 1600.. then do this:

If time<1600 then begin

' your entry code

end;

That will prevent an entry based on that last bar

Follow me on Twitter Reply With Quote
The following user says Thank You to kevinkdog for this post:
 
(login for full post details)
  #9 (permalink)
 10handles 
San Francisco CA
 
Experience: Beginner
Platform: TradeStation
Trading: Options
 
Posts: 10 since Apr 2014
Thanks: 4 given, 2 received


kevinkdog View Post
Simple. Say the time of the last bar of the day is 1600.. then do this:

If time<1600 then begin

' your entry code

end;

That will prevent an entry based on that last bar

Super, thanks Kevin!

Started this thread Reply With Quote


futures io Trading Community Platforms and Indicators TradeStation > Need EasyLanguage help with HighD(1)


Last Updated on October 23, 2015


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Journal Challenge w/$1,800 in prizes!

April

An Introduction to CME Group Micro Bitcoin Futures w/David Lerman

Elite only
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), 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