Historical / Last Bar - futures io
futures io



Historical / Last Bar


Discussion in TradeStation

Updated
      Top Posters
    1. looks_one ZARk with 3 posts (1 thanks)
    2. looks_two SammyD with 1 posts (2 thanks)
    3. looks_3 selnomeria with 1 posts (0 thanks)
    4. looks_4 Turbosteve with 1 posts (0 thanks)
    1. trending_up 2,618 views
    2. thumb_up 3 thanks given
    3. group 4 followers
    1. forum 5 posts
    2. attach_file 0 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
 

Historical / Last Bar

(login for full post details)
  #1 (permalink)
ZARk
Waterloo
 
 
Posts: 9 since Aug 2009
Thanks: 1 given, 1 received

Hello

I am looking for a TS Equivalent to NinjaTrader's Historical property, or even the LastBar equivalent.

Basically I need to know if the bar is getting it's data from the database, or if it's a "live" bar.

I looked around, but couldn't get anything that would give me the amount of bars present ( which i could compare with currentBar and thus know if i'm running on the lastBar of the chat).


I'm starting to think the only solution would be to start comparing the RealTime with the Bar Time and the barInterval, and determine if the bar took less than barInterval time to run which would mean it's running from database and not live ... but this seems a bit too subjective .... .

Any ideas ?

Reply With Quote

Journal Challenge April 2021 results:
Competing for $1800 in prizes from Jigsaw
looks_oneMaking a Living with the Microsby sstheo
(620 thanks from 61 posts)
looks_twoSalao's Journalby Salao
(162 thanks from 29 posts)
looks_3Learning to Profit - A journey in algorithms and optionsby Syntax
(115 thanks from 27 posts)
looks_4Deetee’s DAX Trading Journal (time based)by Deetee
(94 thanks from 30 posts)
looks_5Maybe a little bit different journalby Malykubo
(53 thanks from 32 posts)
 
Best Threads (Most Thanked)
in the last 7 days on futures io
I finally blew up an account
124 thanks
The Crude Dude Oil Trading System
85 thanks
Spoo-nalysis ES e-mini futures S&P 500
65 thanks
The tiyfTradePlanFactory indicator
31 thanks
Building a Crypto Mining Rig
19 thanks
 
(login for full post details)
  #2 (permalink)
 SammyD 
Salt Lake City, Utah
 
Experience: Intermediate
Platform: NinjaTrader, Tradestation
Trading: Forex
 
Posts: 72 since Feb 2011
Thanks: 274 given, 36 received

Perhaps you are looking for the function "lastbaronchart"

Reply With Quote
The following 2 users say Thank You to SammyD for this post:
 
(login for full post details)
  #3 (permalink)
ZARk
Waterloo
 
 
Posts: 9 since Aug 2009
Thanks: 1 given, 1 received



SammyD View Post
Perhaps you are looking for the function "lastbaronchart"


I feel like an idiot now .... Why on earth does that function not appear in the help when you type "lastbar" .. i don't know ..

Works like a charm ! Thanks m8 !

Reply With Quote
 
(login for full post details)
  #4 (permalink)
ZARk
Waterloo
 
 
Posts: 9 since Aug 2009
Thanks: 1 given, 1 received

Actually i found even better !


GetAppInfo(aiRealTimeCalc);

which is the equivalent to "Historical" in NT

returns 0 if the bar is "backtested" and 1 if it's live

Reply With Quote
The following user says Thank You to ZARk for this post:
 
(login for full post details)
  #5 (permalink)
 Turbosteve 
Sydney Nsw Australia
 
Experience: Intermediate
Platform: Amibroker, Multicharts
Broker: I.B, CQG
Trading: NQ, 6E, SPI
 
Posts: 18 since Jun 2012
Thanks: 50 given, 8 received

Thanks a lot.

I have been using Multicharts for 3 weeks and wanted to draw a trendline for the trailing stop and initial stops on the last bar. I spent 2 hours trying to find a solution before looking here and finding the answer in 2 minutes.

Love Multicharts, but the help is pretty ordinary.


Reply With Quote
 
(login for full post details)
  #6 (permalink)
 selnomeria 
Tbilisi + Georgia
 
Experience: None
Platform: ThinkScript,Tradestation
Trading: EUR/USD
 
Posts: 34 since Aug 2014
Thanks: 8 given, 18 received

some of solutions, to detect bar's date and positions...

 
Code
BarInterval   						[returns 5 for 5minute chart and etc...]
value1= FindBar(1050510, 1030); 	[returns bar using the specific date and time]
lastbaronchart  					[returns TRUE or FALSE]    					//p.s. same as GetAppInfo(aiRealTimeCalc)
GetAppInfo(aiSpaceToRight)			[returns bars after last rightmost bar]		//p.s. MaxBarsForward ???


ELDateToString(CurrentDate)	[returns 01/27/2015]
LastCalcTime				[returns 2350 	(it's 23:50)]
LastCalcDate				[returns 960226	(it's 02/26/96)]

Plot2(elsystem.Datetime.CurrentTime.Format("%I:%M:%S, %p"));

Visit my futures io Trade Journal Reply With Quote


futures io Trading Community Platforms and Indicators TradeStation > Historical / Last Bar


Last Updated on January 12, 2015


Upcoming Webinars and Events

NinjaTrader Indicator Challenge!

Ongoing

Journal Challenge w/$1,800 in prizes!

May 7

The Cold Hard Truth: Maybe I Am Not Good Enough w/Chris Gray @ Earn2Trade

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