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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        152 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        89 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        131 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        127 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        107 views
        0 likes
        Last Post CarlTrading  
        Working...
        X