Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Which type of C# variable to use to asigne a number to each of the price types?

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

    Which type of C# variable to use to asigne a number to each of the price types?

    Which type of C# variable can I use to asigne a number to each of the price types?

    For example: public ?........? MyInput
    { Open = 1,
    Close = 2,
    Typical = 3,
    and so on .....
    }

    And than use it as:
    SMA(MyInput, 14)[0]

    #2
    Not sure I follow. If you code this
    SMA(MyInput, 14)[0]
    ... then MyInput either needs to to be an indicator or a data series. There is no other choice.

    Comment


      #3
      Hello Dierk,

      I want asign a number to each one of the existing Ptice types (open, close, high, low, typical, median)

      And than use that number in place of Input (its the same but in stead of words use numbers so I can run a optimizasion on whitch type of Input better to use)

      By the way, how can I create a new Price type for NT, NT is missing one important one: OHLC/4

      Comment


        #4
        >> how can I create a new Price type for NT
        Unfortunately this is not supported.

        >> OHLC/4
        Curious: Do you have any reference/link for this which outlines the usage of this price type? Thanks

        Comment


          #5
          I have seen this price type in several other charting platforms and you aply it to Indicators, one for example is SierraChart (there it's called OHLC Average) and ass I can see it smothes any indicator considerably whitout adding extra lag (it seems to be far better than NTs Typical price type which is HLC/3, called HLC Average in SierraCHart).


          Will this be integrated in NT?

          P.S. I alredy found the solution to my main cuestion. I can use, public enum .

          Comment


            #6
            Thanks for that info.

            Do you know what the industry accepted term is for OHLC/4 (like "Typical" is industry wide term for HLC/3)?

            Comment


              #7
              Sorry Dierk, I don't know the industry term, I have seen it everywhere as OHLC/4 .
              To be true I even don't like and don't understand why NT uses this terms because I needed a while to found out that typical is HLC/3 when i started with NT because NT is the unic platform I know using this terms and 90% of average user don't know them, as all the other platforms use HL/2 HLC/3 OHLC/4 or HL Avg HLC Avg OHLC Avg and if you are totaly new to trading you specialy will not know what typical means (which newby knows the indystry terms??).
              But everybudy who trades understands HL/2 HLC/3 OHLC/4 and someone who is totaly new also will understand it because its simple math and everybady can imagin what HL/2 (for example) means.

              I would strongly recomend NT to use HL/2 HLC/3 OHLC/4 or HL Avg HLC Avg OHLC Avg as names!!
              This would be totaly clear for everybudy (better alot than the industry terms)!

              Comment


                #8
                Hi whitegun,

                Thanks for the thoughts. We will add them to the list of future considerations.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  What you're asking for appears to be a Sierra chart specialty. The web has a lot of references like this:
                  Median price (High+Low)/2
                  Typical price (High+Low+Close)/3
                  Weighted price (High+Low+Close+Close)/4

                  ... but I found none on OHLC/4

                  Comment


                    #10
                    Dierk, it is not a sierra speciality because I also have seen this in other platforms.

                    However, the poin is, it is something very useful and it is very easy to implement in NT (your programmer should be able to implement this in a couple of minutes, its nothing special, simply one more price type and from the maths stand point it is also straight forward, simply OHLC/4), so why not ad it!

                    I supose you could easyly add this in the next NT 6.5 update.

                    P.S. I tryed to search but also can not found the industry name for it but what I know is, it is very useful because it smothes EMAs and other indicators barelly without adding lag and everybudy who I know who uses Sierra use all their indicators with the OHLC/4 input.

                    Comment


                      #11
                      Please let me know as you find other references outside SR. Thanks

                      Comment


                        #12
                        Hello Dierk,

                        I don't understand?
                        What do you mean with other references?

                        Like I told you lots of charting platforms have this option apart of Sierra, for example Esignal, Investor R/T ...

                        Have also a look at this link http://www.mypivots.com/articles/glo...px?qterm=HLC/3

                        By the way, if I don't remember wrong (correct me if I am wrong) OHLC/4 is the HeikenAshi Close

                        Comment


                          #13
                          Not sure I follow. We are not talking about the HLC/3 (=Typical) which you linked below and which already is supported by NT but the OHLC/4 you found in SR.

                          Is the OHLC/4 used by any other platform than SR? Do you have links?

                          Comment


                            #14
                            No, we are not talking about HLC/3 (did you go to the link?), I only aded that link becouse I could not found to much abaut OHLC/4 on the net and that link also mentions OHLC/4 as a popular alternatives to the HLC/3.

                            OHLC/4 is the Heiken Ashi CLOSE (also called: Average price of current bar)!!!!

                            Other platforms, like I wrote in my previos post, Esignel and Investor R/T

                            Simply write in google.com : price type ohlc/4

                            Comment


                              #15
                              Yes I got the link (see my post below). Thanks

                              >> I could not found to much abaut OHLC/4 on the net
                              Correct, since it's not popular. More popular is the weighted price (H+L+C+C)/4 (note: 2 times the close), which will be supported by NT7.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by CortexZenUSA, Today, 12:53 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post CortexZenUSA  
                              Started by CortexZenUSA, Today, 12:46 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post CortexZenUSA  
                              Started by usazencortex, Today, 12:43 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post usazencortex  
                              Started by sidlercom80, 10-28-2023, 08:49 AM
                              168 responses
                              2,265 views
                              0 likes
                              Last Post sidlercom80  
                              Started by Barry Milan, Yesterday, 10:35 PM
                              3 responses
                              11 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Working...
                              X