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 kinfxhk, 07-14-2026, 09:39 AM
        0 responses
        125 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 10:18 AM
        0 responses
        105 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 09:50 AM
        0 responses
        85 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 07:21 AM
        0 responses
        105 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-11-2026, 02:11 AM
        0 responses
        85 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X