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

Custom Drawing Objects

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

    Custom Drawing Objects

    Somewhere I read that Ninja 8 can use custom drawing object??

    I've searched the documentation but I can't find it...

    I want to create new objects....double the size of the Dot, and Diamond....

    Can you point me in the right direction?

    Many thanks.

    #2
    Hello llanqui,

    Thank you for your note.

    There is an indicator that is publicly available on our NinjaTrader Ecosystem website with customizable chart markers:There are also DrawPlus draw methods included as noted on that page. You can use the intelliprompt for help with the method signature(s) available.

    Here is a basic guideline of how to import NinjaScript add-ons in NinjaTrader 8:

    Note — To import NinjaScripts you will need the original .zip file.

    To Import:
    1. Download the NinjaScripts to your desktop, keep them in the compressed .zip file.
    2. From the Control Center window select the menu Tools > Import > NinjaScript Add-on...
    3. Select the downloaded .zip file
    4. NinjaTrader will then confirm if the import has been successful.

    Critical - Specifically for some NinjaScripts, it will prompt that you are running newer versions of @SMA, @EMA, etc. and ask if you want to replace, press 'No'

    Once installed, you may add the indicator to a chart by:
    • Right-click your chart > Indicators... > Select the Indicator from the 'Available' list on the left > Add > OK

    Here is a short video demonstration of the import process:
    Please let me know if I can be of further assistance.

    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
    Emily C.NinjaTrader Customer Service

    Comment


      #3
      Thanks, have a great weekend!

      Comment


        #4
        Hi guys!

        I want to code a custom drawing tool that draws not only one horizontal line when I click the high or the low of a bar with the crosshair but multiple horizontal lines around these points.

        I looked at "Using SharpDX for Custom Chart Rendering" in NinjaScript Reference Guide. I would like to know if this kind of tool needs ShardDX. Could it be coded in standard NinjaScript?

        I also read two or three other users' solutions for plotting labeled lines, but I'm not interested in labels, just in multiple horizontal lines above and below a price.

        So, I started stripping unnecessary text-handling code but ended up in a mess. I still need to sort out the overall code structure of this tool, meaning understanding where to create my logic and custom resources like brushes and strokes and how to integrate it into the Drawing Panel of NinjaTrader.

        Last but not least, how do we configure it to be used and exported?
        What structure should the final .zip file have?​

        Comment


          #5
          Hello Gianpiero,

          Thank you for your note.

          You may view the source code for the default NinjaTrader drawing tools inside of the NinjaScript Editor. Open the DrawingTools folder from the explorer menu on the right, then double-click any file to open it in the editor. If you take a look at Lines, for example, you can see that these drawing tools and the draw methods have been created using custom SharpDX rendering. Your question "could it be coded in standard NinjaScript" is a little confusing; please provide more information or an example so I may better understand and assist you.

          For your tool to be integrated into the drawing panel and be exportable, you should create it within the NinjaScript Editor inside of the DrawingTools folder. You may either copy an existing drawing tool file by opening the script, right-clicking the background of the open file, then selecting Save As and saving it under a new name or you may start a new drawing tool from scratch by right-clicking the DrawingTools folder and selecting New Drawing Tool. This will open up the New Drawing Tool wizard that will guide you through the setup then generate the beginning of your script for you. Once you are done with scripting your tool, it will be exportable via Control Center > Tools > Export > NinjaScript AddOn which will save the .zip folder for you without needing to change any of the structure or formatting yourself.

          I believe the conversation in the following thread will be useful for your needs:


          Since you have mentioned drawing multiple lines, it may be worth checking out tools and scripts such as the FIbonacciTools, GannFan, or TrendChannel to see if one of these ways of drawing multiple lines is what you are looking for. If you are able to provide more information about how you would like the horizontal lines drawn around where you click for your tool, we might be able to offer additional information or guidance. For example, will these be drawn at set distances above and below the price? Will the distances be editable? Do you plan on having a set number of lines drawn or do you plan to have the capability of adding/removing lines as desired?

          Please let us know if we may be of further assistance.
          Emily C.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by PeakTry, Today, 10:49 AM
          0 responses
          2 views
          0 likes
          Last Post PeakTry
          by PeakTry
           
          Started by llanqui, Today, 10:32 AM
          0 responses
          4 views
          0 likes
          Last Post llanqui
          by llanqui
           
          Started by StockTrader88, 03-06-2021, 08:58 AM
          45 responses
          3,992 views
          3 likes
          Last Post johntraderuser2  
          Started by TAJTrades, Today, 09:46 AM
          0 responses
          8 views
          0 likes
          Last Post TAJTrades  
          Started by rhyminkevin, Yesterday, 04:58 PM
          5 responses
          62 views
          0 likes
          Last Post dp8282
          by dp8282
           
          Working...
          X