Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

lowest low

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

    lowest low

    hi

    im trying to write strategy that uses lowest low and highest high .
    but whenever i use (price close <= lowest bar ( low) x period ago ) it wont enter to a position.

    what seems to be the problem ?

    #2
    Hi german87,

    Are you trying to do this with an Atm Strategy in the SuperDOM or Chart Trader?

    (I ask because this post is in the Atm Strategies section)

    Or are you doing this in a NinjaScript strategy?

    If this is in a NinjaScript strategy may I see the code you are using?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      im doing this in ninja strategy wizard

      Comment


        #4
        Hi german87,

        May I see the code you are using? (Click View Code)
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          i have attached the strategy , is it enough ?
          Attached Files

          Comment


            #6
            Hello german87,

            Currently you are using LowestBar in your script.

            LowestBar returns a BarsAgo value not a price.

            I think you are wanting Low[LowestBar(Low, 7)].

            This cannot be done with the Strategy Wizard and you would need to unlock your script and add this code manually.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              can you please write this to me in the strategy i sent you ?
              so i would have an example

              thanks !!!

              Comment


                #8
                Hi german87,

                Yes, I have made an example for you and attached to this post.
                Attached Files
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_ChelseaB View Post
                  Hi german87,

                  Yes, I have made an example for you and attached to this post.
                  I was very interested to look at the code, Chelsea. I noticed you used the method Low[LowestBar(Low, ... as suggested by german87.

                  The following is a point I've tried to make in the Forum a few times:

                  Isn't, to use the exact code used in the strategy, Low[LowestBar(Low, 7)] the exact mathematical equivalent of MIN(Low,7)?

                  Correct me if I'm wrong, Chelsea, but I think the only point in using LowestBar is if you're trying to locate how many bars ago the lowest bar occurred, which isn't the case here.

                  If I'm right, then I'm guessing that MIN(Low, ... is more efficient in terms of processing than Low[LowestBar(Low, ... if only marginally. Would this be a correct assumption?

                  Thanks for letting me know.

                  P.S. Also in code, you have:

                  (Close[0] >= HighestBar(High, 7))

                  which is a double compared to an int. Maybe this should be:

                  (Close[0] >= High[HighestBar(High, 7))] or even MAX(High,7) ???

                  Comment


                    #10
                    Hi arbuthnot,

                    You are correct!

                    MIN(Low, 7) is the same as Low[LowestBar(Low, 7)]

                    I wouldn't be able to say which uses less resources. It is probably the same.
                    Chelsea B.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Haiasi, 04-25-2024, 06:53 PM
                    4 responses
                    62 views
                    0 likes
                    Last Post effraenk  
                    Started by ccbiasi, 11-23-2017, 06:06 AM
                    5 responses
                    2,200 views
                    0 likes
                    Last Post leodavis  
                    Started by kujista, Yesterday, 12:39 AM
                    2 responses
                    14 views
                    0 likes
                    Last Post kujista
                    by kujista
                     
                    Started by Austiner87, Yesterday, 11:24 AM
                    2 responses
                    13 views
                    0 likes
                    Last Post brucerobinson  
                    Started by Rogers101, 05-05-2024, 11:30 AM
                    3 responses
                    22 views
                    0 likes
                    Last Post Rogers101  
                    Working...
                    X