How to reference historical price bars by time - EasyLanguage Programming | futures io social day trading
futures io futures trading


How to reference historical price bars by time
Updated: Views / Replies:7,965 / 4
Created: by billtf 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
 

How to reference historical price bars by time

  #1 (permalink)
Trading Apprentice
New York, NY USA
 
Futures Experience: Advanced
Platform: Tradestation
Favorite Futures: Forex and Futures
 
Posts: 1 since Feb 2012
Thanks: 1 given, 0 received

How to reference historical price bars by time

Hey everyone, I'm a new member to this forum. I had a question regarding how to reference a historical bar in Easylanguage. I know you can use [1] to reference a previous bar, but I can't figure out how to return the close of a particular time. For example I want to setup a reversal play at the end of the day is price has moved more than a certain amount from another reference bar. This is what I've tried so far *inputs: starttime(1530), endtime(1555); variables: barcalc(0); barcalc=endtime-starttime; If Time = endtime and (close[barcalc] - close) 10 then buy next bar at market;* I think this should work on a 1 minute chart but TS gives me an error saying it cannot reference the number of bars. Any help would be appreciated.

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)
 Vendor: tradingcode.net 
The Netherlands
 
Futures Experience: None
Platform: MultiCharts, TradingView
Favorite Futures: ...
 
Jura's Avatar
 
Posts: 774 since Apr 2010
Thanks: 2,347 given, 661 received



billtf View Post
Hey everyone, I'm a new member to this forum.

I had a question regarding how to reference a historical bar in Easylanguage.

I know you can use [1] to reference a previous bar, but I can't figure out how to return the close of a particular time.

For example I want to setup a reversal play at the end of the day is price has moved more than a certain amount from another reference bar. This is what I've tried so far:
 
Code
inputs: starttime(1530), endtime(1555);   

variables: barcalc(0);    

barcalc=endtime-starttime;    

If Time = endtime and (close[barcalc] - close) 10 then  
buy next bar at market;
I think this should work on a 1 minute chart but TS gives me an error saying it cannot reference the number of bars. Any help would be appreciated.

You could try to store the close price on a specific time, like..

 
Code
Variables:
    storedClose(0);
    
// Store close of a specific time    
if (Time = 1530) then
    storedClose = Close;
    
// Compare it with the current close
if (Time = 1555) and ((Close - storedClose) >= 10) then
    Buy next bar at market;
(Tip: use enters and the [ code ] and [ / code ] tags around your answer for easier reading/better understanding)

Reply With Quote
The following 2 users say Thank You to Jura 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,240 since Jun 2009
Thanks: 29,354 given, 83,237 received

I am thinking MultiCharts 8 has added some new functionality in this area, but am not on right computer to check the changelog right now.

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
 
  #5 (permalink)
Trading Apprentice
phoenix az
 
Futures Experience: Intermediate
Platform: tradestation
Favorite Futures: es
 
Nevi's Avatar
 
Posts: 4 since Aug 2011
Thanks: 0 given, 1 received

The simplest way to reference past bars is to create a counter, start at your specified time or condition, then use that counter to reference how many bars ago your condition occurred.
Here is a basic signal that uses a counter to reference a previous bar.
[ code ]
vars: count(0);
if barnumber>0 then begin
count = 0;
if time = 830 then begin
count = count[1] + 1;
end;
if time = 1430 then begin
if close > (close[count] +10 then
sell short next bar at market;
end;
[ / code ]

Reply With Quote
The following 2 users say Thank You to Nevi for this post:

Reply



futures io > > > > > How to reference historical price bars by time

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Maximum Daily Price Fluctuation reached - historical statistic MaxPayne Traders Hideout 8 February 21st, 2012 05:30 AM
How to reference Session template Price/Time? forrestang NinjaTrader Programming 8 November 24th, 2011 01:05 PM
Delta Price Bars eminitrdr NinjaTrader 4 July 19th, 2011 06:05 PM
FisherTransform - able to reference the bars that FisherTransform Indicator produces Zipper Ripper NinjaTrader Programming 5 July 9th, 2011 07:03 PM
Historical Tick data (for range bars) ?? tammyd549 Traders Hideout 3 March 1st, 2011 07:08 AM


All times are GMT -4. The time now is 04:56 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-16 in 0.10 seconds with 19 queries on phoenix via your IP 54.163.210.170