Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

coding or thinking issue

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

    coding or thinking issue

    Hello,

    I have an issue with my thinking or coding (or both). Can´t get it how I can do

    "if minimum of last x bars is Low of KeyReversalBarUp" then do....

    Thanks for any hint
    Tony

    #2
    Originally posted by tonynt View Post
    Hello,

    I have an issue with my thinking or coding (or both). Can´t get it how I can do

    "if minimum of last x bars is Low of KeyReversalBarUp" then do....

    Thanks for any hint
    Tony
    You have two different periods to deal with there, and you have only specified one. "Low of KeyReversalUp", measured over what period?

    Remember that this period will most likely not be the same as "x", as the lowest bar will most likely occur before the CurrentBar, and you want to be measuring whether that lowest bar is also a KeyReversalUp bar.

    Comment


      #3
      Hello koganam,

      Thank you for your reply and also the information of properties and possible values of lows of the bar (this also depends on working with minute-bars or range-bars or RangeNoGap-bars). I have coded my divergence-conditions, but now I have the problem only how I can add to work with: let me please explain in words "I-only-want-to-use-the-minimum-of-last-8-bars-when-it-is-a-KeyReversalUpbar"

      I determine eg
      && Low[0] < MIN(Lows[5], 8)[1]

      and I want to code it so that I can grab and use the Min(Lows[5], 8) [1] if its also/and only if it is a KeyReversalUp Bar.

      I hope I could explain what I mean and again thank you for your help. I think you are a programmer as you know a lot about. Maybe you can help me out this small issue.

      Best regards
      Tony




      Originally posted by koganam View Post
      You have two different periods to deal with there, and you have only specified one. "Low of KeyReversalUp", measured over what period?

      Remember that this period will most likely not be the same as "x", as the lowest bar will most likely occur before the CurrentBar, and you want to be measuring whether that lowest bar is also a KeyReversalUp bar.

      Comment


        #4
        Originally posted by tonynt View Post
        Hello koganam,

        Thank you for your reply and also the information of properties and possible values of lows of the bar (this also depends on working with minute-bars or range-bars or RangeNoGap-bars). I have coded my divergence-conditions, but now I have the problem only how I can add to work with: let me please explain in words "I-only-want-to-use-the-minimum-of-last-8-bars-when-it-is-a-KeyReversalUpbar"

        I determine eg
        && Low[0] < MIN(Lows[5], 8)[1]

        and I want to code it so that I can grab and use the Min(Lows[5], 8) [1] if its also/and only if it is a KeyReversalUp Bar.

        I hope I could explain what I mean and again thank you for your help. I think you are a programmer as you know a lot about. Maybe you can help me out this small issue.

        Best regards
        Tony
        I must not have been clear. KeyReversalUp means nothing unless you specify the context, independently of anything else.

        Look at the picture I have posted, and you will see that the indicated bar is a KeyReversalUp over 4 bars, but not over 5. You need to make a clear distinction between the lookback period for your lowest low, and the KeyReversalUp lookback. They can be the same, but you must specify if that is what you seek, otherwise you have not properly identified what you seek.

        Of course, a KeyReversalUp is most usually sought over a lookback of 1 bar (i.e., from one bar to the next). However, you must still state so, if that is what you want. When you request code, you do have to specify all the parameters. Unfortunately, just the nature of coding.
        Attached Files
        Last edited by koganam; 11-22-2012, 12:10 PM.

        Comment


          #5
          Yes,

          this is what I seek:

          if (MIN(Low, 5) [1 ]= "an "upbar" with close > open")

          then do...

          Best
          Tony

          QUOTE=koganam;311103]I must not have been clear. KeyReversalUp means nothing unless you specify the context, independently of anything else.

          Look at the picture I have posted, and you will see that the indicated bar is a KeyReversalUp over 4 bars, but not over 5. You need to make a clear distinction between the lookback period for your lowest low, and the KeyReversalUp lookback. They can be the same, but you must specify if that is what you seek, otherwise you have not properly identified what you seek.

          Of course, a KeyReversalUp is most usually sought over a lookback of 1 bar (i.e., from one bar to the next). However, you must still state so, if that is what you want. When you request code, you do have to specify all the parameters. Unfortunately, just the nature of coding. [/QUOTE]
          Last edited by tonynt; 11-22-2012, 02:19 PM. Reason: typing error

          Comment


            #6
            Originally posted by tonynt View Post
            Yes,

            this is what I seek:

            if (MIN(Low, 5) [1 ]= "an "upbar" with close > open")

            then do...

            Best
            Tony
            Code:
             
            if (KeyReversalUp(1)[LowestBar(Low, 5)] == 1) MakeMegaBucks();

            Comment


              #7
              Thank you!

              But how would you do for having the "actual" bar [0] not included in the (5)?
              (like I wrote with MIN(Low, 5) [1])

              as I try to get

              Low[0] < KeyReversalUp(1)[LowestBar(Lows[5], 5)] [1] ???


              Thank you very much in advance!

              Best
              Tony



              Originally posted by koganam View Post
              Code:
               
              if (keyreversalup(1)[lowestbar(low, 5)] == 1) makemegabucks();
              Last edited by tonynt; 11-27-2012, 12:54 PM. Reason: wrong description

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by devatechnologies, 04-14-2024, 02:58 PM
              3 responses
              19 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by tkaboris, Today, 08:01 AM
              0 responses
              2 views
              0 likes
              Last Post tkaboris  
              Started by BarzTrading, Today, 07:25 AM
              1 response
              11 views
              1 like
              Last Post NinjaTrader_Clayton  
              Started by EB Worx, 04-04-2023, 02:34 AM
              7 responses
              161 views
              0 likes
              Last Post VFI26
              by VFI26
               
              Started by Mizzouman1, Today, 07:35 AM
              1 response
              9 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Working...
              X