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

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.


    And a link to a forum post with helpful information about getting started with NinjaScript.



    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] = .




        Text can be added with Draw.Text() or Draw.TextFixed().

        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().


            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?
                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.
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #13
                          hey reedstickets , were you able to find/create this position sizer?

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by TheWhiteDragon, 01-21-2019, 12:44 PM
                          5 responses
                          551 views
                          0 likes
                          Last Post NinjaTrader_ChelseaB  
                          Started by rtwave, 04-12-2024, 09:30 AM
                          5 responses
                          37 views
                          0 likes
                          Last Post NinjaTrader_ChelseaB  
                          Started by funk10101, Today, 12:02 AM
                          1 response
                          11 views
                          0 likes
                          Last Post NinjaTrader_LuisH  
                          Started by GLFX005, Today, 03:23 AM
                          1 response
                          6 views
                          0 likes
                          Last Post NinjaTrader_Erick  
                          Started by nandhumca, Yesterday, 03:41 PM
                          1 response
                          13 views
                          0 likes
                          Last Post NinjaTrader_Gaby  
                          Working...
                          X