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

Increase Triangle size

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

    Increase Triangle size

    The following is a section of code for a DownTriangle and its alert (there is also an exact duplicate for an UpTriangle)...is there a parameter to increase the size of the Triangle shown on the Chart?

    Thanks in advance!

    Code:
    {	
    
    if(CrossBelow(average, 0, 1) && eco[0] < average[0] && triangleDn == 0 || CrossAbove(average, eco, 1) && average[0] < 0 && triangleDn == 0)	
    {DrawTriangleDown("EcoDT", true, 0, 0, Color.Transparent);
    if (alerts == true)					
    Alert("DnTrend",NinjaTrader.Cbi.Priority.Medium,"Dn Trend Pending","Drip.wav",6,Color.Black,Color.Yellow);	
    edownbar = CurrentBar;
    edownplot = 1;}
    	
    if(edownplot == 1 && CurrentBar == edownbar + 1)
    {RemoveDrawObject("EcoDT");
    edownplot = 0;
    if(eco[1] < average[1] && average[1] < 0 && triangleDn == 0)
    {DrawTriangleDown(CurrentBar.ToString() + "EcoDTSolid", true, 1, 0, Color.Red);
    	if(eco[1] > eco[2] || average[1] > average[2])
    		DrawTriangleDown(CurrentBar.ToString() + "EcoDTSolidDark", true, 1, 0, Color.LightSalmon);
    triangleDn = 1;
    if (alerts == true)					
    Alert("DnTrendFinal",NinjaTrader.Cbi.Priority.Medium,"Dn Trend","Alert2.wav",6,Color.Black,Color.Yellow);}
    }

    #2
    Prov1332,

    Unfortunately there is no current way to change the size of triangles.

    Please let me know if I may assist further.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Yikes, but thanks AdamP.

      Any possibility that the coders could include that in the future?

      Comment


        #4
        Prov1322,

        I will make the suggestion to them on your behalf.

        Thanks for the suggestion, and please let me know if I may assist further.
        Adam P.NinjaTrader Customer Service

        Comment


          #5
          AdamP...with that same snippet of code could I change it to a graphic that would be sizeable?

          If so, which? For example, Dot, Diamond, Arrow?

          Thanks!

          Comment


            #6
            Prov1322,

            I am happy to assist you.

            You can use DrawRectangle(), DrawEllipse() or DrawTriangle().







            Apologies, I should have given you the DrawTriangle() link before, as the DrawTriangleUp() and DrawTriangleDown() use this method as their parent function. For some reason I was thinking of DrawArrowUp()/DrawArrowDown() which cannot be resized.

            Please let me know if I may assist further.
            Last edited by NinjaTrader_AdamP; 01-06-2012, 12:11 PM.
            Adam P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by Prov1322 View Post
              AdamP...with that same snippet of code could I change it to a graphic that would be sizeable?

              If so, which? For example, Dot, Diamond, Arrow?

              Thanks!
              Use DrawText() instead with a Symbol, Dingbat or Wingdings font. Text objects are near infinitely resizeable, and to boot, also capable of being placed with pixel-level precision.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by sidlercom80, 10-28-2023, 08:49 AM
              168 responses
              2,262 views
              0 likes
              Last Post sidlercom80  
              Started by Barry Milan, Yesterday, 10:35 PM
              3 responses
              10 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by WeyldFalcon, 12-10-2020, 06:48 PM
              14 responses
              1,429 views
              0 likes
              Last Post Handclap0241  
              Started by DJ888, 04-16-2024, 06:09 PM
              2 responses
              9 views
              0 likes
              Last Post DJ888
              by DJ888
               
              Started by jeronymite, 04-12-2024, 04:26 PM
              3 responses
              41 views
              0 likes
              Last Post jeronymite  
              Working...
              X