Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can a indicator do this?

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

    Can a indicator do this?

    Hey guys,

    I am new to programming in Ninjatrader and dont know how to implement the following...

    I want to draw arrows (up and down) on the chart everytime one MA crosses another... furthermore the arrows should remain on the chart... can i implement this with an indicator? (input are two periods for the mas)

    thanks very much in advance!

    greets!

    #2
    Hello,

    Yes, you can. I suggest using these links:






    Give it a try (or use the Strategy Wizard) and post your code if you get stuck.
    DenNinjaTrader Customer Service

    Comment


      #3
      thanks a lot, ben... i already programmed a first version...

      however i have two questions...
      1) i am only getting one arrow on the chart... everytime a new crossover takes place the arrow jumps to the last crossover....
      2) how do i get or how can i define the type of SMA i want (for example the open and not the close)

      thanks again, bye!

      Comment


        #4
        ikea,

        1. You are getting that b/c you need to have a different "tag" for each arrow. I recommend using CurrentBar as the tag for your application. If you ever have two draw objects (arrows, circles, etc) on the same bar this will not work, but for now it will be fine for your application.
        2. You can use any DataSeries object for the SMA. So for your case, SMA(Open, iPeriod)[0].

        hope this is helpful.

        -logiK
        mrlogik
        NinjaTrader Ecosystem Vendor - Purelogik Trading

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        579 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        334 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        554 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X