NexusFi: Find Your Edge


Home Menu

 





ThinkOrSwim - count # of bars


Discussion in ThinkOrSwim

Updated
    1. trending_up 3,312 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 0 posts
    2. attach_file 0 attachments




 
Search this Thread

ThinkOrSwim - count # of bars

  #1 (permalink)
Futures888333
Siren, WI USA
 
Posts: 1 since Feb 2016
Thanks Given: 0
Thanks Received: 0

Hi there!
I am wondering if anyone out there knows how to modify the "GetEventOffset" function on TOS to count # of bars from a certain date? The reason I am looking for this is to offset a plot on an hourly chart offset from data 5 days ago. Being that the number of bars on an hourly chart per day fluctuate based on exchange and after hours trading, I can't specify "from 40 bars ago" (5days x 8bars) to get the data from 5 days ago.

The closest thing I found is using the following code which counts # of bars since last conference call. What I want is to modify this code to output #of bars since close 5 days ago.... Does that make sense?
 
Code
AddChartBubble(
 HasConferenceCall(),
 high,
 "The last conference call was " + 
  GetEventOffset(Events.CONFERENCE_CALL, -1) + 
  " bars ago");
THANK YOU IN ADVANCE!!!!

Reply With Quote




Last Updated on February 19, 2016


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts