• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Position Sizer

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

    Position Sizer

    Does anyone know of a position sizer for nt8? I see a great one for NT7 "traderuler" but it has not been converted. I am looking for an indicator which you put in account size, % risk (.5% stop) then have the indicator be a line you move on the chart. Move to your entry price and it shows how many units you need to buy/sell.

    Seems easy and should perhaps be a standard indicator that comes with NT. I just like staying with the charts and wondering away to do math in a calculator i a little annoying.

    TIA

    #2
    Hello TIA,

    I'm not aware of an existing indicator like this but you may be able to create one.

    Below is a link to a forum post where a similar inquiry has been asked.
    https://ninjatrader.com/support/foru...470#post522470

    And a link to a forum post with helpful information about getting started with NinjaScript.
    https://ninjatrader.com/support/foru...040#post786040


    This thread will remain open for any community members that may know of an existing script.

    You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the help Chelsea.

      So I would need to create a movable horizontal line plot with the math. But how do I make the plot read the price makers and display the position size on the chart?

      TIA

      Comment


        #4
        Hello TIA,

        A plot is added with AddPlot() and the value is set with Value[0] = .

        https://ninjatrader.com/support/help...us/addplot.htm
        https://ninjatrader.com/support/help...n-us/value.htm

        Text can be added with Draw.Text() or Draw.TextFixed().
        https://ninjatrader.com/support/help..._textfixed.htm
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Can't get it to do what I need. Let me rephrase my question.

          Basically I need and indicator that is a movable horizontal line that take the price marker of wherever I move it and divides that price by 25000. The shows me that number in text.

          Seems easy enough but I am not sure how I access the price marker value (which will be changing anytime I move the horizontal line plot. This would just do wonders for me.


          TIA

          Comment


            #6
            Hello TIA,

            Horizontal line is drawn with Draw.HorizontalLine().
            https://ninjatrader.com/support/help...zontalline.htm

            Price markers come from plots or from the last price. What value do you want?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              I need the value to be the price marker of the horizontal line plot. So whatever price I move the Hline to on the chart would be the value.

              Thanks

              Comment


                #8
                Hello reedstickets,

                An indicator plot?

                You can set the value of the horizontal line to the indicator plot on each new bar or each new tick..

                What are you moving? Are you changing the Period or some other value for an indicator?

                Do you need a plot marker with no plot?
                https://ninjatrader.com/support/foru...207#post786207
                Last edited by NinjaTrader_ChelseaB; 08-18-2019, 08:53 PM.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  I would be moving the actual Hline around to different prices on the chart where I would be looking to enter the market so the when I move it to the price I want to enter it would grab the price calculate my logic and give me my position size. Kind of like the chart trader , where you move your entries and stops on the chart to different prices.

                  Comment


                    #10
                    Hello reedstickets,

                    The line will move each time you call Draw.HorizontalLine() when using the same tag name.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Well I would want to just manually click the line drag move it to my price and have it calculate my logic.

                      Comment


                        #12
                        Hello reedstickets,

                        After drawing an object save this to a variable. On each new bar or each new tick check the drawingObject.StartAnchor.Price and EndAnchor.Price to see where the user has moved this.
                        https://ninjatrader.com/support/help...zontalline.htm
                        Chelsea B.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by smcllr, Yesterday, 08:25 PM
                        1 response
                        9 views
                        0 likes
                        Last Post NinjaTrader_ChrisSch  
                        Started by pol133, Today, 12:39 AM
                        0 responses
                        7 views
                        0 likes
                        Last Post pol133
                        by pol133
                         
                        Started by giulia_brotzu, Yesterday, 10:09 PM
                        0 responses
                        4 views
                        0 likes
                        Last Post giulia_brotzu  
                        Started by Woomera, Yesterday, 09:55 PM
                        0 responses
                        3 views
                        0 likes
                        Last Post Woomera
                        by Woomera
                         
                        Started by fr33b, Yesterday, 09:02 PM
                        2 responses
                        6 views
                        0 likes
                        Last Post fr33b
                        by fr33b
                         
                        Working...
                        X