Time of x ticks bar - EasyLanguage Programming | futures.io
futures.io futures trading
 

Go Back   futures.io

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > TradeStation > EasyLanguage Programming


Time of x ticks bar
Started:October 18th, 2016 (11:05 AM) by TraderWalrus Views / Replies:102 / 4
Last Reply:October 19th, 2016 (04:05 AM) Attachments:0

Welcome to futures.io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • 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, and we will never resell your private information.

-- Big Mike
     

Reply
 
Thread Tools Search this Thread

Time of x ticks bar

Old October 18th, 2016, 11:05 AM   #1 (permalink)
Trading Apprentice
Bangkok Thailand
 
Futures Experience: Intermediate
Platform: IB, MC
Favorite Futures: Forex
 
Posts: 20 since May 2016
Thanks: 8 given, 4 received

Time of x ticks bar

In case of using bars of 100 ticks each (for example) - how is it possible to find the time difference between the current and previous bar?

The Time() function only returns hours and minutes. Is there a way to get the time of the previous bar with an accuracy of seconds?

Reply With Quote
     

Old October 18th, 2016, 11:05 AM   #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.

     

Old October 18th, 2016, 12:17 PM   #3 (permalink)
 Vendor: abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,148 since Apr 2013
Thanks: 191 given, 646 received


TraderWalrus,

"Time_s" is time accurate to seconds, "DateTime" would even give you millisecond accuracy.

Regards,

ABCTG

Reply With Quote
     
The following user says Thank You to ABCTG for this post:
     

Old October 19th, 2016, 01:34 AM   #4 (permalink)
Trading Apprentice
Bangkok Thailand
 
Futures Experience: Intermediate
Platform: IB, MC
Favorite Futures: Forex
 
Posts: 20 since May 2016
Thanks: 8 given, 4 received

I tried to use time_s - time_s[1] to get the difference in seconds between the current and the previous bar, it works as long as both bars are in the same minute.

Any easy way to calculate this difference when the bars are in different minutes / hours? is it possible to convert the value returned by time_s to seconds since midnight for example?

Reply With Quote
     

Old October 19th, 2016, 04:05 AM   #5 (permalink)
 Vendor: abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,148 since Apr 2013
Thanks: 191 given, 646 received

Futures Edge on FIO
TraderWalrus,

you can't just subtract these time values without running into the issue you describe - it would be the same for "Time - Time[1]". One approach is to use the TimeToSeconds function to convert the time to seconds (for both time values) and then build the difference between seconds.
Keep in mind that you might get negative times in case the previous bar is on the previous day, while the current bar is on the current day.

Regards,

ABCTG

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

Reply



futures.io > Futures Trading, News, Charts and Platforms > Platforms and Indicators > TradeStation > EasyLanguage Programming > Time of x ticks bar

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

NinjaTrader 8: Features and Enhancements, Tips and Tricks

Dec 6
 

Al Brooks: Stop Losing when a Good Trade goes Bad, Correcting Mistakes

Elite only
 

Trading Technologies: Algo Design Lab hands-on

Dec 13
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tick Chart:# of Ticks per Bar Indicator? PilotTrader NinjaTrader 6 February 20th, 2016 05:38 PM
Bar by Bar Cumulative Time and Sales Indicator - Sierra Chart waves1000 Sierra Chart 1 December 23rd, 2015 06:29 PM
ASC TREND for Thinkorswim? Real time (up-to-ticks) market trends with Buy/Sell signal rommark ThinkOrSwim 0 October 8th, 2014 05:25 PM
number of ticks in a bar/ms timestamp ? sam028 NinjaTrader Programming 15 September 21st, 2012 08:50 AM
I think Ninja trader drops ticks real time gomi NinjaTrader Programming 2 November 23rd, 2010 11:50 PM


All times are GMT -4. The time now is 04:17 PM.

Copyright © 2016 by 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 2016-12-04 in 0.08 seconds with 19 queries on phoenix via your IP 54.161.208.7