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

Up/Down Arrow on price in Margin?

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

    Up/Down Arrow on price in Margin?

    Hello,
    Is it possible to plot an Up/Down Arrow, Diamond, Triangle etc. in the right margin, right next to the current price?
    This DrawText code plots a text right next to the current price in the margin and follows the price.
    DrawText("Closemarker", false, " " +"< CCI Falling", 0, Close[0] ,Color.Red, txtFont, StringAlignment.Near, Color.Red, Color.Red, 2);

    Instead of plotting the text at the price...how can I plot an Up/Down Arrow at the price?

    I know how to use the DrawArrowUp/Down,
    DrawArrowUp("tag1", true, 0, Low[0] - TickSize, Color.Red);
    but how can I plot it at the current price in the right margin and not above or below the current bar.

    Thanks

    #2
    dwalls,

    Unfortunately you cannot programmatically draw objects in the right side margin.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Ok...Thanks Josh

      Comment


        #4
        You can use a different font like WingDings3 to show up/down triangles. You will have to use a separate DrawText statement and overlap the other text to add a triangle after that text. Make sure you make good use of spaces and transparency.
        eDanny
        NinjaTrader Ecosystem Vendor - Integrity Traders

        Comment


          #5
          Thanks eDanny,
          If you could post a sample code of something like that I would greatly appreciate it.

          Thanks

          Comment


            #6
            I thought you wanted regular text and a symbol, hence the comment about spacing and transparency since you would have to DrawText twice in the same spot with two different fonts. This is easier, just drawing a triangle.

            DrawText(
            "Closemarker", false, " " +"q", 0, Close[0] ,Color.Red,new Font("WingDings3",15), StringAlignment.Near, Color.Red, Color.Red, 2);

            I believe the "q" would produce a solid triangle down and "p" would make a solid triangle up.

            An "r" would be a hollow triangle up and "s" would be hollow triangle down.
            eDanny
            NinjaTrader Ecosystem Vendor - Integrity Traders

            Comment


              #7
              Thanks eDanny.
              I got it to work.

              Thanks

              Comment


                #8
                Hey eDanny,
                Could you give me a sample of how to do the regular text next to the symbol? One thing leads to another..lol.
                Taking it one step at a time.
                I have given it a shot but it just plots one or the other but not both.
                So I dont have it right yet.
                Thanks in advance for any help.

                Comment


                  #9
                  Without trying it, I would say DrawText in the same spot using a regular font and with enough spaces to draw after the symbol and make use of transparent background color (and the opacity of the transparency). If you can't get it to work right you can always put the text below the symbol.
                  eDanny
                  NinjaTrader Ecosystem Vendor - Integrity Traders

                  Comment


                    #10
                    my font folder is on E drive, is there a way to point it to E instead of default C drive?

                    Comment


                      #11
                      nkhoi,

                      Unfortunately not. It will use the default Windows font folder.
                      Josh P.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by judysamnt7, 03-13-2023, 09:11 AM
                      4 responses
                      57 views
                      0 likes
                      Last Post DynamicTest  
                      Started by ScottWalsh, Today, 06:52 PM
                      4 responses
                      36 views
                      0 likes
                      Last Post ScottWalsh  
                      Started by olisav57, Today, 07:39 PM
                      0 responses
                      7 views
                      0 likes
                      Last Post olisav57  
                      Started by trilliantrader, Today, 03:01 PM
                      2 responses
                      19 views
                      0 likes
                      Last Post helpwanted  
                      Started by cre8able, Today, 07:24 PM
                      0 responses
                      9 views
                      0 likes
                      Last Post cre8able  
                      Working...
                      X