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


Time of x ticks bar
Updated: Views / Replies:231 / 4
Created: by TraderWalrus 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

  #1 (permalink)
Trading Apprentice
Bangkok Thailand
 
Futures Experience: Intermediate
Platform: IB, MC
Favorite Futures: Forex
 
Posts: 21 since May 2016
Thanks: 9 given, 5 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
 
  #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)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,319 since Apr 2013
Thanks: 208 given, 745 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:
 
  #4 (permalink)
Trading Apprentice
Bangkok Thailand
 
Futures Experience: Intermediate
Platform: IB, MC
Favorite Futures: Forex
 
Posts: 21 since May 2016
Thanks: 9 given, 5 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
 
  #5 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,319 since Apr 2013
Thanks: 208 given, 745 received

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 > > > > > Time of x ticks bar

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

FIO Journal Challenge featuring NinjaTrader ($2,000+ of prizes)

May
 

EasyLanguage ABC's: Mastering TradeStation Programming w/Chris Kaiser

Elite only
 

Prototyping Python Strategies (part 2: Backtesting) w/Ran Aroussi

Elite only
 

Portfolio Diversification w/Brendon Delate @ Diversify Portfolio

Elite only

An Afternoon with FIO member Softsoap (being rescheduled)

Elite only
     

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


All times are GMT -4. The time now is 01:38 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-05-22 in 0.08 seconds with 19 queries on phoenix via your IP 23.20.179.211