Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Strategy, new indicator to be programmed

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

    Strategy, new indicator to be programmed

    Hello all,

    Here is my problem. It takes me hours to go though all the charts manually and look for my entry pattern. I would like to be able to have a custom indicator that detects my entry pattern , that way I could then run it in market analyzer and get a list of all potential stocks.

    I was wondering if any programmers out there familiar with ninjascript could help me out coding this indicator, I would really appreciate it ! Here is the logic for a buy: there must be at least 5 consecutives bars that closed above 10 ema, then 1 bar that closes below or really close to 10ema and the following bar that closes above 10 ema and above the close of the previous bar (the one that closed below 10 ema). If you need more information please pm me.

    Thank you
    Last edited by mlambole; 08-14-2010, 06:02 PM.

    #2
    Hello,

    Hopefully someone will help you. As an alternative you may want to go here:
    DenNinjaTrader Customer Service

    Comment


      #3
      mlambole, I have almost no background in programming or ninjascrpting. I just made my first 2 indicators using Help files & a forum post in the last 36 hours.

      Here is an indicator with all of your Entry criteria. My twist for "closes below or near 10 ema" was to simply look for a Close below a faster ema.
      The default setting for main (slow) EMA is 10, and faster EMA is 7. These are customizable.

      This indicator does NOT plot any EMA on the chart, it only draws Green or Red Triangles below/above your Long/Short entry bars.

      The code also contains Sound Alerts, but its the first time I have coded those, and have yet to test it in real-time.

      Having said that, I have NO clue as to how to set this up with Market Analyzer.

      [Made with NT 6.5. Not tested on NT 7.]
      Attached Files
      Last edited by ekshay; 08-17-2010, 05:06 PM.

      Comment


        #4
        Ekshay,

        Thank you so much for your help. It turns out I also looked at the documentation and was able to create the indicator I wanted.

        To run it through market analyzer, your script must return 1 for example when a certain condition is met and then you can load the indicator in market analyzer and tell him to go through all the stocks and keep the ones where your indicator returns 1.

        in the initialize function you add :
        Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Bar, "Plot0"));

        and in the onbarupdate function when the buy/sell condition is met you return 1 like this
        Plot0.Set(1);


        That's it

        Cheers !

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Radano, 06-10-2021, 01:40 AM
        19 responses
        605 views
        0 likes
        Last Post Radano
        by Radano
         
        Started by KenneGaray, Today, 03:48 AM
        0 responses
        4 views
        0 likes
        Last Post KenneGaray  
        Started by thanajo, 05-04-2021, 02:11 AM
        4 responses
        470 views
        0 likes
        Last Post tradingnasdaqprueba  
        Started by aa731, Today, 02:54 AM
        0 responses
        5 views
        0 likes
        Last Post aa731
        by aa731
         
        Started by Christopher_R, Today, 12:29 AM
        0 responses
        11 views
        0 likes
        Last Post Christopher_R  
        Working...
        X