Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Double Low - Double High

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

    Double Low - Double High

    Hi
    I'd have two questions to ask:
    1. is there a way to implement a strategy searching for a double low (or a double high) in a reduced period ? I looked for something similar in this forum, however I found nothing;
    2. the attachments shows that I have one strategy working somewhere, but I don't know which one: there is no active strategy in any chart nor on other opened scanners and windows, in Tools -> Strategies the boxes are all disabled, Orders-Executions-Positions tabs are full with rows but mention no strategy name..... How may I understand where do the orders come from ?
    Attached Files

    #2
    Fliesen,

    Thank you for your post.

    You would need to create your own logic for when to detect this and then use that information to essentially, start your strategy.

    Please send me your log and trace files for today so that I may look into what occurred.

    You can do this by going to the Control Center-> Help-> Mail to Support.

    Please reference my name in the subject of the email:ATTN Cal and this thread in the body
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Thank you, I watched into my log / trace files by myself, and could see the origin of the unexpected orders.
      As to the double lows, it would be enough to me if I find something somewhere to start my logic with. Since I could retrieve nothing on the forum under "double lows", how do you say in English two minimums at the same level and in a near timeframe ?

      Comment


        #4
        Originally posted by fliesen View Post
        Thank you, I watched into my log / trace files by myself, and could see the origin of the unexpected orders.
        As to the double lows, it would be enough to me if I find something somewhere to start my logic with. Since I could retrieve nothing on the forum under "double lows", how do you say in English two minimums at the same level and in a near timeframe ?
        You would use the Swing() class to get the last 2 swings, and if necessary the bars on which they occur, and then compare values as needed.

        Comment


          #5
          Thank you.

          Since my skills with NinjaScript are limited, do these functions


          Low[Math.Min(0, Swing(5).SwingLowBar(0, 1, 30))]
          and
          High[Math.Max(0, Swing(5).SwingHighBar(0, 1, 30))]


          correctly identify the lowest and highest price of the last 30 bars, to be compared with the current Close[0] ?
          Last edited by fliesen; 05-06-2014, 12:44 PM.

          Comment


            #6
            Originally posted by fliesen View Post
            Thank you.

            Since my skills with NinjaScript are limited, do these functions


            Low[Math.Min(0, Swing(5).SwingLowBar(0, 1, 30))]
            and
            High[Math.Max(0, Swing(5).SwingHighBar(0, 1, 30))]


            correctly identify the lowest and highest price of the last 30 bars, to be compared with the current Close[0] ?
            Not quite. The first statement is wrong because it makes a test for a minimum barsAgo value that can result in a -1 illegal value. I believe that NT will trap it and return a 0 value for the bar, but the logic is still flawed.

            For the comparison that you describe, correct would be:

            Math.Min(Low[0], Low[Math.Max(0, Swing(5).SwingLowBar(0, 1, 30))])

            and

            Math.Max(High[0], High[Math.Max(0, Swing(5).SwingHighBar(0, 1, 30))])

            Comment


              #7
              Thank you.

              Can you confirm that "Math.Max" in the expression

              Math.Min(Low[0], Low[Math.Max(0, Swing(5).SwingLowBar(0, 1, 30))])

              ?

              Comment


                #8
                Originally posted by fliesen View Post
                Thank you.

                Can you confirm that "Math.Max" in the expression

                Math.Min(Low[0], Low[Math.Max(0, Swing(5).SwingLowBar(0, 1, 30))])

                ?
                Yes. What do you think is the problem with it? Look at the placement of the brackets. They are always processed first in order. Arithmetic 101.

                Comment


                  #9
                  Well, I thought that a Double Low had to be a Math.Min among lows, i.e. while I saw a "Max(imum)".
                  Thanks again.

                  Comment


                    #10
                    Originally posted by fliesen View Post
                    Well, I thought that a Double Low had to be a Math.Min among lows, i.e. while I saw a "Max(imum)".
                    Thanks again.
                    The expression: Math.Max(0, Swing(5).SwingLowBar(0, 1, 30)) that is being used to calculate an index for a IDataSeries has nothing to do with what that IDataSeries might be. It is a calculation of an indexing value, period. Nothing more.
                    Last edited by koganam; 11-20-2014, 12:07 PM. Reason: Corrected punctuation. Removed duplicate phrase.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    633 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    364 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    105 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    567 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    568 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X