Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarType....isNewSession

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

    BarType....isNewSession

    Created a simple 'bar type'....and the following code

    PHP Code:
    if (SessionIterator == null)
          
    SessionIterator = new SessionIterator(bars);

    bool myisNewSession SessionIterator.IsNewSession(timeisBar); 
    ....always shows myisNewSession as 'true'.

    Which means the following piece of code

    PHP Code:
    if (isNewSession)
    {
        
    create the session bar
    }
    else
    {
       
    create the rest of the bars

    gives me a tick chart of single close bars because myisNewSession is always triggered.

    If there is already a problem reported on this, my apologies.
    If not.....is there something else I should be checking?

    #2
    Hello,

    Thank you for the question.

    I would be unsure by what is provided why that is not working correctly, can you tell me what the value of "isBar" would be while this is being checked? This method is used successfully in the other bar types so potentially it is just the bool being used. That may play a role but would only be a guess on the limited example.

    Would you be able to provide a full sample that demonstrates how you are creating the session iterator and also how you are printing to check its value? That may provide more information on what is happening.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      I can do that.....
      (I was just 'fiddling around' with Ninja beta 10 late yesterday when I ran into this.... let me go
      back and find my code.... )

      Comment


        #4
        Jesse,

        found the data...sending it to you via email (attn: Jesse). including chart, .txt file with the printed output, and the BarType .zip file.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by helpwanted, Today, 03:06 AM
        1 response
        13 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        11 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        6 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        242 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        387 views
        1 like
        Last Post Gavini
        by Gavini
         
        Working...
        X