Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to draw an arrow within Strategy Builder

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

    How to draw an arrow within Strategy Builder

    Hi, I am a newbie with Strategy Builder.

    I tried to draw an "arrow-up" if a certain condition is met. But I don't get it.
    Instead of drawing an arrow, I tried the function to color a bar, to check whether my condition is met at all. This worked fine.
    But I cannot manage to draw anything on my chart.
    Could anybody give me a hint how to do? Many thanks.

    #2
    Hello dho1967,

    Would you please take a screen shot of the action section of the builder with the arrow as you have it set up, similar to the one I have attached?

    I look forward to your reply.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Hi Alan,

      Thanks for your fast response.

      Well, finally I could draw my up and down arrows in the chart. There was a mistake in the "Y" value field.

      But I still cannot draw any lines.

      For testing purposes I tried to color the MACD slope in green if the condition (MACD[0] >= MACD[1]) is met or in red if the value is less.

      Do I undestand it correctly, that I have to select the MACD indicator under the field "Y" (Value)
      (MACD1.Default[0]) to apply the drawings to the indicator panel?
      I guess my drawings get overwritten. There are many checkboxes you can select to plot on screen, which I actually don't really understand.

      I used "horizontal lines" or "dot" but nothing helped. I don't get my drawings on the MACD indicator panel.

      Is there any further documentation or are there any samples available?

      Attached you will find the configuration screen shots.

      Appreciate your support.

      Regards
      Daniel
      Attached Files

      Comment


        #4
        Hello dho1967,

        If using the strategy builder you would not be able to specify the panel drawing objects are applied to. To do this you would have to use the NinjaScript Editor.

        Per your request I will submit a feature request to be allow to specify the panel.

        Please let us know if you need further assistance.
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Ok, understood.

          But what's the purpose to be able to select an indicator i.e. MACD in the "Y" field under actions?

          Like I did within my strategy where I prompt to draw a colored "Dot" if the value of the MACD.default of current bar is greater or equal then the previous. But where get the "Dot" be drawn? Any idea? Because I cannot find..


          if (MACD1.Default[0] >= MACD1.Avg[1])
          {
          Draw.Dot(this, @"MyMACDStrategyColor" + CurrentBars[0].ToString(), false, 0, MACD1.Default[0], Brushes.Lime);
          }

          Do you have a simple guidance/sample how to draw a line or a Dot within the Chart? I spent hours and I still cannot manage to do? Or are there further documentation about drawing a line within the Strategy Builder?


          Thank you for your Support.

          Regards
          Daniel
          Attached Files

          Comment


            #6
            Hello dho 1967,

            In your code, you are attempting to draw a dot at a y value of MACD1.Default[0], which likely is far below the current price on the chart and thus off the visible area of the chart, ex, .005.

            I might suggest using the following code so a dot is drawn on every bar, at the close price of the current bar, which might help you understand.
            if (Close[0] > 0)
            {
            Draw.Dot(this, @"MyCustomStrategy3" + CurrentBars[0].ToString(), false, 0, Close[0], Brushes.CornflowerBlue);
            }

            Using the logic above, a dot will be drawn on the close of the current bar, ever bar.

            You could see the following section of our helpguide on draw dot,


            Please let us know if you need further assistance.
            Alan P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Today, 05:17 AM
            0 responses
            44 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            124 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            65 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            42 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            46 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X