Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarsSinceEntry()

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

    BarsSinceEntry()

    Hello,

    I'm not able to figure this out, so maybe someone can help me. Please have a look at the attached picture.

    Now in my opinion the following values should be printed to the output window.

    18.00
    Bars since entry = 0
    Lowest bar since entering trade = 0
    Lowest price since entering trade = 1,0968

    19.00
    Bars since entry = 1
    Lowest bar since entering trade = 1
    Lowest price since entering trade = 1,0968

    20.00
    Bars since entry = 2
    Lowest bar since entering trade = 2
    Lowest price since entering trade = 1,0968

    21.00
    Etc.

    However, the output window print the following:

    25-7-2016 18:00:00 BarsSinceEntry() = 0
    25-7-2016 18:00:00 LowestBar(Low,BarsSinceEntry() = 0
    25-7-2016 18:00:00 Low[LowestBar(Low,BarsSinceEntry()] = 1,0968
    25-7-2016 19:00:00 BarsSinceEntry() = 1
    25-7-2016 19:00:00 LowestBar(Low,BarsSinceEntry() = 0
    25-7-2016 19:00:00 Low[LowestBar(Low,BarsSinceEntry()] = 1,0977
    25-7-2016 20:00:00 BarsSinceEntry() = 2
    25-7-2016 20:00:00 LowestBar(Low,BarsSinceEntry() = 1
    25-7-2016 20:00:00 Low[LowestBar(Low,BarsSinceEntry()] = 1,0977

    Where the LowestBar seems to be one lower than supposed to. Does anyone now why this is?

    Thanks in advance.

    Regards,

    Gunnar
    Attached Files

    #2
    Hello Bruin813,

    Thank you for writing in.

    I wouldn't expect the Low value to go up.

    Can you please provide your script so I may test it on my end?

    If it is an indicator, it can be found within the Documents\NinjaTrader 7\bin\Custom\Indicator folder on your computer. If it is a strategy, it can be found within the Documents\NinjaTrader 7\bin\Custom\Strategy folder.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Dear Zachary,

      I think I found out. The LowestBar function does not see zero as a valid value while BarsSinceEntry() does.

      Thanks for replying, though.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Jonafare, 12-06-2012, 03:48 PM
      5 responses
      3,986 views
      0 likes
      Last Post rene69851  
      Started by Fitspressorest, Today, 01:38 PM
      0 responses
      2 views
      0 likes
      Last Post Fitspressorest  
      Started by Jonker, Today, 01:19 PM
      0 responses
      2 views
      0 likes
      Last Post Jonker
      by Jonker
       
      Started by futtrader, Today, 01:16 PM
      0 responses
      8 views
      0 likes
      Last Post futtrader  
      Started by Segwin, 05-07-2018, 02:15 PM
      14 responses
      1,792 views
      0 likes
      Last Post aligator  
      Working...
      X