NexusFi: Find Your Edge


Home Menu

 





Getting started: custom indicator


Discussion in NinjaTrader

Updated
    1. trending_up 1,117 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 0 posts
    2. attach_file 0 attachments




 
Search this Thread

Getting started: custom indicator

  #1 (permalink)
choubix
Bangkok + Thailand
 
Posts: 10 since Aug 2012
Thanks Given: 2
Thanks Received: 0

Hi Everyone,

I have not been active online for some time (but I have been trading. Forex and volatility mostly) and I believe it is time for me to start toying with something else than excel...

Initially I wanted to learn some C# and get started on MC .Net but I quickly realized that NinjaTrader looked more approachable.

So here I am: trying to code my first indicator (smoothed RsRank, to change the color of my chart depending on whether it is a Bull/Bear market regimes as described here: //systemtradersuccess.com/trend-testing-indicators ).
The idea would be for me to try some strategies using DV2 and RSI2 as Entry points while looking at the current market regime using RsRank or TSI (something along that line: //adaptivetrader.wordpress.com/2012/09/29/dv2-indicator/)


Replicating some youtube tutorials was fun and all but coding something (as simple as a smoothed RsRank) is not easy.

This is what I have done:
New ninjascript (indicator)
created 2 variables : LT_Close and ST_Close, values: 140 and 20 respectively

and in the OnBarUpdate:

double RsRank = ( ( Close[0] - LT_Close + Close[0] - ST_Close ) / 2 ) / ATR[10];

Even at this early stage, the code doesnt compile... (then I would have to smooth it as described in the link above of course)


Any pointer would be really appreciated (any book with examples or projects on how to learn coding with Ninjatrader available??)


Thanks in advance!
Alex

Reply With Quote




Last Updated on November 22, 2014


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts