Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Developing a simple Strategy using wizard ...

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

    Developing a simple Strategy using wizard ...

    The strategy is a simple crossover and I cannot get it to draw Up Arrow or Down Arrow or anything else on the chart.
    I have included a PlaySound and Print to output window, and both work perfectly each and every time ... but no arrows!

    Am using the following line (typical for both directions) to add the arrows ....

    DrawArrowUp("My up arrow" + CurrentBar, true, 0, Close[0], Color.Lime)

    Have also used different variations of this eg.

    DrawArrowUp("My up arrow" + CurrentBar, true, 0, Low[0] +1 * TickSize, Color.Lime)
    DrawArrowUp("My up arrow" + CurrentBar, false, 0, High[0] +1 * TickSize, Color.Lime)

    .... etc. without success.


    I have also read the various threads and links and help manual without success.

    Can you offer any suggestions why it doesn't draw on the chart please?

    #2
    Hello,

    The way you are drawing the arrows seems fine. I suspect the problem stems from your condition and not your drawing method.

    Are you receiving any errors in the Control Center logs tab? Please post your code so we can further evaluate it.
    DenNinjaTrader Customer Service

    Comment


      #3
      Hello and thank you for your reply.
      I am receiving no errors in the Control Center logs tab and the sound & output window is as per the code.
      The code is attached,

      Regards.
      Attached Files

      Comment


        #4
        Euler,

        What is PrintWithTimeStamp()? This is not a NinjaTrader method. For testing purposes please try changing it to Print(Time[0] + " Long now!").
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          What is PrintWithTimeStamp()? This is not a NinjaTrader method......
          Hello Josh,
          I do not understand this, as the simple strategy was created using the strategy wizard using the options it gave me.

          The PrintWithTimeStamp() came via "Conditions and Actions", "Add", "Misc", "Print to output window".

          I included it in the strategy just as a means of letting me know that the actions were being carried out, as a means of trying to work out why the arrows are not being drawn.

          Regards.

          Comment


            #6
            Hi Euler,

            You are right. I was thinking about something else for the Print.

            For your code, the only thing I see that is wrong is that you used "Ticksize". I am sure in your real code you have "TickSize" though.

            I ran your code on my end and it does show arrows. It is a little hard to see because the arrows are drawn onto the bars and the candlestick body usually covers the whole arrow. Please check again if you really not seeing the arrows.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            598 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            343 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            556 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            555 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X