NexusFi: Find Your Edge


Home Menu

 





Building a Simple NT8 Indicator


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
bld5
Istanbul/Turkey
 
Posts: 6 since May 2013
Thanks Given: 2
Thanks Received: 0

Hello,

I need to create a simple NT8 indicator but I have no familiarity with NT8 coding.

Here is what I want the indicator to show:(last x periods' highest value - last x periods' lowest value) / 2

It would be great if someone can send me the code or maybe assist me on how I can edit an existing indicator.

Thanks.


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Daytrading to swingtrading
Traders Hideout
Thanks Mike. Godspeed.
The Elite Circle
Ninjatrader users - good CONNECTIONs post and article fr …
NinjaTrader
Without Pulisic, USA 61.5% Live vs. Australia -- France …
Prediction Markets & Event Contracts
Iran Lebanon Problem Kills Switzerland Talks, Brent at $ …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Want your NinjaTrader indicator created, free?
5 thanks
FootPrintV2 Chart for NT8
1 thanks
BERN ALGOS algo trading journal
1 thanks
Afternoon-close session
1 thanks
Franks Trading Journey
1 thanks
  #2 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,099 since Jun 2009
Thanks Given: 877
Thanks Received: 8,098


bld5 View Post
Hello,

I need to create a simple NT8 indicator but I have no familiarity with NT8 coding.

Here is what I want the indicator to show:(last x periods' highest value - last x periods' lowest value) / 2

It would be great if someone can send me the code or maybe assist me on how I can edit an existing indicator.

Thanks.

this code should compile OK


Attached Files
Elite Membership required to download: MyCustomIndicator.cs
Reply With Quote
Thanked by:
  #3 (permalink)
bld5
Istanbul/Turkey
 
Posts: 6 since May 2013
Thanks Given: 2
Thanks Received: 0


Cory thanks for your quick reply.

I renamed an existing indicator, deleted all content and pasted your code but after hitting compile it gave several error messages. I am not sure if I did something wrong. Could you please post it in zip format so that I can directly import it?


Reply With Quote
  #4 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,099 since Jun 2009
Thanks Given: 877
Thanks Received: 8,098


bld5 View Post
Cory thanks for your quick reply.

I renamed an existing indicator, deleted all content and pasted your code but after hitting compile it gave several error messages. I am not sure if I did something wrong. Could you please post it in zip format so that I can directly import it?

1) copy .cs file to \Documents\NinjaTrader 8\bin\Custom
2) open any indicator and compile it (this will re-compile all indicators )
3) look for mycustomindictor on your list, it's ready to use. If you want to rename it, open it and right click and give it a name you want then save and compile the new indicator.


Reply With Quote
  #5 (permalink)
bld5
Istanbul/Turkey
 
Posts: 6 since May 2013
Thanks Given: 2
Thanks Received: 0

Cory I followed the steps, mycustomindicator showed up on the list, I added to a chart but there was no visible line. Any ideas?


Reply With Quote
  #6 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,099 since Jun 2009
Thanks Given: 877
Thanks Received: 8,098


bld5 View Post
Cory I followed the steps, mycustomindicator showed up on the list, I added to a chart but there was no visible line. Any ideas?

It doesn’t show line it shows value of h - l / 2 looks at bottom of the last 10 bars the message shows there


Reply With Quote
  #7 (permalink)
bld5
Istanbul/Turkey
 
Posts: 6 since May 2013
Thanks Given: 2
Thanks Received: 0

I was told that what I look for is the midline of Donchian Channel, so problem solved.

Thanks.


Reply With Quote




Last Updated on December 13, 2017


© 2026 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 - Downloads - Top
no new posts