• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

uniRenko New date indicator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • NinjaTrader_ChelseaB
    replied
    Hi Buttermilk,

    Thanks for your post.

    If you want to detect something on the first tick of the day, you will need to run the script on every tick.

    If the script only runs when a bar closes, then it would not be possible to detect something after 1 tick.

    You run the script with Calculate on bar close set to false, or you can use intra-bar granularity of 1 tick.

    You could also use a timer that runs on an interval and check the current system time instead of the bar time. (DateTime.Now)

    Below is a link to an example of intra-bar granularity.
    http://www.ninjatrader.com/support/f...ead.php?t=6652

    And attached is an example of using a timer.
    Attached Files

    Leave a comment:


  • Buttermilk
    started a topic uniRenko New date indicator

    uniRenko New date indicator

    I have a session break to force a new Onbarupdate to end my day. My system runs perpetually. I want my strategy to know when it is a new day. It is my understanding that Time[0] is the date and time of the last completed bar. Thus it does not have the current date. If this is true then I need to wait for the second bar to end to know that that date has changed. Is there a way to know the date has changed with the first tick of the day short of changing my OnBarUpdate to be tick by tick.

Latest Posts

Collapse

Topics Statistics Last Post
Started by b16_aln, Today, 12:47 AM
0 responses
2 views
0 likes
Last Post b16_aln
by b16_aln
 
Started by mbcmbc, Yesterday, 11:01 PM
0 responses
7 views
0 likes
Last Post mbcmbc
by mbcmbc
 
Started by morrnel, Yesterday, 09:39 PM
0 responses
2 views
0 likes
Last Post morrnel
by morrnel
 
Started by Thesuccesfulinvestor, Yesterday, 09:07 PM
0 responses
6 views
0 likes
Last Post Thesuccesfulinvestor  
Started by WestonMicah, Yesterday, 12:44 AM
1 response
19 views
0 likes
Last Post koganam
by koganam
 
Working...
X