• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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,
            http://ninjatrader.com/support/helpG.../?draw_dot.htm

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

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by saltminer, Today, 05:19 PM
            0 responses
            3 views
            0 likes
            Last Post saltminer  
            Started by martyn73, Today, 04:18 PM
            0 responses
            2 views
            0 likes
            Last Post martyn73  
            Started by aprendiz, Today, 03:42 PM
            0 responses
            2 views
            0 likes
            Last Post aprendiz  
            Started by 1001111, Today, 09:10 AM
            1 response
            18 views
            0 likes
            Last Post NinjaTrader_ChrisL  
            Started by usero86, Today, 06:02 AM
            1 response
            12 views
            0 likes
            Last Post NinjaTrader_ChrisL  
            Working...
            X