reference future data in EasyLanguage? - EasyLanguage Programming | futures io social day trading
futures io futures trading


reference future data in EasyLanguage?
Updated: Views / Replies:3,075 / 9
Created: by shzhning Attachments:0

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 
Thread Tools Search this Thread
 

reference future data in EasyLanguage?

  #1 (permalink)
Elite Member
Nanjing, NJ
 
Futures Experience: Intermediate
Platform: CQG/TOS
Broker/Data: Optimus/CQG
Favorite Futures: CL
 
Posts: 102 since Jun 2010
Thanks: 33 given, 71 received

reference future data in EasyLanguage?

Hi I'm new to this forum, and this is going to be my first post.

Here's my question: I know you can reference historical data by using "[1]" (1 bar ago), but is it allowed to reference future data using "[-1]" (1 bar ahead)?

I'm asking this question because I'm working on a study that calls for identifying the highest/lowest price within a range of 5 bars, i.e. current bar, 2 bars before current bar, and 2 bars after current bar.

Thanks in advance!

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,220 received



shzhning View Post
Hi I'm new to this forum, and this is going to be my first post.

Here's my question: I know you can reference historical data by using "[1]" (1 bar ago), but is it allowed to reference future data using "[-1]" (1 bar ahead)?

I'm asking this question because I'm working on a study that calls for identifying the highest/lowest price within a range of 5 bars, i.e. current bar, 2 bars before current bar, and 2 bars after current bar.

Thanks in advance!

There is no such thing as "after the current bar". Not unless you are trading from your Delorian going 88mph:

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following 3 users say Thank You to Big Mike for this post:
 
  #4 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,220 received


shzhning View Post
I'm asking this question because I'm working on a study that calls for identifying the highest/lowest price within a range of 5 bars, i.e. current bar, 2 bars before current bar, and 2 bars after current bar.

If you want to know the High or Low of the last 5 bars:

 
Code
                            
vars:

  
myH (0),
  
myL (0);

myH Highest(H5);
myL Lowest(L5); 
If you need something more advanced you'll need to explain more in depth your process so someone can help.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following user says Thank You to Big Mike for this post:
 
  #5 (permalink)
Elite Member
Nanjing, NJ
 
Futures Experience: Intermediate
Platform: CQG/TOS
Broker/Data: Optimus/CQG
Favorite Futures: CL
 
Posts: 102 since Jun 2010
Thanks: 33 given, 71 received

Thanks Mike!

But this is not exactly what I'm looking for. Let me do a better job explaining my idea:

1) I would first look for the highest/lowest point within 3 bars, i.e. current bar and previous 2 bars.
2) Then I would wait for the next 2 bars to confirm. If the next 2 bars do not break through the previous range, then the range holds. If the next 2 bars do break through the previous range, then range would adapt dynamically.

I'm new to EasyLanguage and not sure if it's feasible in MultiCharts/TradeStation.

Thanks again!

Reply With Quote
 
  #6 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,220 received


shzhning View Post
Thanks Mike!

But this is not exactly what I'm looking for. Let me do a better job explaining my idea:

1) I would first look for the highest/lowest point within 3 bars, i.e. current bar and previous 2 bars.

 
Code
                            
vars
  
myH (0), 
  
myL (0); 

myH Highest(H3); 
myL Lowest(L3); 

shzhning View Post
2) Then I would wait for the next 2 bars to confirm. If the next 2 bars do not break through the previous range, then the range holds. If the next 2 bars do break through the previous range, then range would adapt dynamically.


 
Code
                            
vars
  
myH (0),
  
myHbar (0),
  
myL (0),
  
myLbar (0);

if 
myH and myHbar <= 2 then begin

  myHbar 
0;
  
myH Highest(HmyHbar);

else

 
myHbar += 1;

end;

if 
myL and myLbar <= 2 then begin

  myLbar 
0;
  
myL Lowest(LmyLbar);

else

 
myLbar += 1;

end;

myH Highest(HmyHbar); 
myL Lowest(LmyLbar); 

shzhning View Post
I'm new to EasyLanguage and not sure if it's feasible in MultiCharts/TradeStation.

Just about anything is possible. Try the above code, I just wrote it free hand so it may need some work and probably a good amount of refinement for your exact needs, but I think you get the general idea.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #7 (permalink)
Elite Member
Nanjing, NJ
 
Futures Experience: Intermediate
Platform: CQG/TOS
Broker/Data: Optimus/CQG
Favorite Futures: CL
 
Posts: 102 since Jun 2010
Thanks: 33 given, 71 received

Thanks Mike! That's really helpful.

FYI, here's what I had in mind (hence my original question):
For high point: MaxList(high[2],high[1],high[0],high[-1],high[-2])
For low point:
MinList(low[2],low[1],low[0],low[-1],low[-2])



Reply With Quote
 
  #8 (permalink)
Elite Member
North Bend, WA
 
Futures Experience: Beginner
Platform: Tradestation, C#
Broker/Data: Tradestation
Favorite Futures: None yet
 
BDawg's Avatar
 
Posts: 15 since Oct 2010
Thanks: 63 given, 11 received

Trying to access a bar that hasn't happened yet is impossible.


That's why H[-1] doesn't work. It's in the future, so you don't know what it will be (unless you have the Delorean with the flux capacitor as stated above).

Here's a system that would work great because it knows whether to buy or sell short today and at what price, as well as what price to close the trade on tomorrow:

 
Code
if (H[-1] - L[0] > H[0] - L[-1]) then begin
    buy 100000 contracts at L[0] limit;
    sell 100000 contracts next bar at H[-1] limit;
end
else begin
    sell short 100000 contracts at H[0] limit;
    buy to cover 100000 contracts next bar at L[-1] limit;
end;
I wish my computer knew what the prices are gonna be for the next day or two, but unfortunately, it doesn't.

Reply With Quote
 
  #9 (permalink)
Trading Apprentice
Sydney Australia
 
Futures Experience: Beginner
Platform: TradeStation, MultiCharts
Favorite Futures: Stocks
 
Posts: 3 since Jan 2012
Thanks: 0 given, 1 received

"I wish my computer knew what the prices are gonna be for the next day or two, but unfortunately, it doesn't."

Sorry for re-activating an old post but am new to MC and thought that you may not be aware that you can call up future bars/prices in Easylanguage. It is a dll called AnyOHLC.dll. However one needs to be very careful in applying it in signals!

Reply With Quote
The following user says Thank You to sunbeam for this post:
 
  #10 (permalink)
Elite Member
Den Haag
 
Futures Experience: Intermediate
Platform: Multicharts
Favorite Futures: Silver
 
Posts: 1 since Mar 2011
Thanks: 0 given, 0 received



sunbeam View Post
"I wish my computer knew what the prices are gonna be for the next day or two, but unfortunately, it doesn't."

Sorry for re-activating an old post but am new to MC and thought that you may not be aware that you can call up future bars/prices in Easylanguage. It is a dll called AnyOHLC.dll. However one needs to be very careful in applying it in signals!

Does anybody know where one can get AnyOHLC.dll?

Best regards,

Simon

Reply With Quote

Reply



futures io > > > > > reference future data in EasyLanguage?

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reference another study that's not a function vegasfoster Sierra Chart Programming 3 June 23rd, 2011 02:41 PM
Back to the Future! Back testing multi time frame strategy trades occuring in future mrticks The Elite Circle 10 April 2nd, 2011 10:54 AM
Object reference not set to an instance... dsraider NinjaTrader Programming 5 July 30th, 2010 09:17 AM
plot reference axis SARdynamite NinjaTrader Programming 1 July 8th, 2010 08:50 AM
EasyLanguage Object Reference philloo TradeStation 2 June 18th, 2010 03:56 AM


All times are GMT -4. The time now is 11:50 PM.

Copyright © 2017 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
Page generated 2017-12-12 in 0.13 seconds with 19 queries on phoenix via your IP 54.234.255.29