NexusFi: Find Your Edge


Home Menu

 





Basic NinjaScript Help


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
 
Joseph689's Avatar
 Joseph689 
San Jose, Ca
 
Experience: Beginner
Platform: MetaTrader 4
Broker: Interactive Brokers
Trading: Forex
Posts: 121 since Sep 2012
Thanks Given: 114
Thanks Received: 40

Hello everyone,

I have some ideas for a basic time period type of indicator, but I really want to learn to do it on my own, and learn at the same time.

I know that c# and NinjaScript are the same, but yet there are differences in getting NT to draw on the chart exactly what you want.

I really would appreciate if someone would share with me a piece of code that would do the following; draw a box that would go from the high to the low, spanning a specific time period. The time period, box color/opacity, should all be adjustable.

This would get me started, and I would learn from the code and it would give me a starting point.


Thank you in advance.

Joseph


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Four New E-mini Futures Launch June 29 -- Russell 3000, …
Emini and Emicro Index
May 26 Deadline Dies at 7.5% as US Strikes Iran During C …
Prediction Markets & Event Contracts
Beijing Summit Closes: Xi Pledges Hormuz Help -- $1.14B …
Prediction Markets & Event Contracts
Trump Truth Social Fires Hormuz From 10% to 59% -- Arsen …
Prediction Markets & Event Contracts
El Clasico Draws $9.2M in Prediction Market Action -- Bi …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
10 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #3 (permalink)
 tulanch 
Salt Lake City, UT
 
Experience: Intermediate
Platform: SC, NT, MT
Broker: AMP
Trading: NQ ES YM Bonds
Posts: 285 since Mar 2010
Thanks Given: 51
Thanks Received: 405


Have you looked at their help documentation - use the help button in the menu and look for sample or example indicator code. There is an entire section on this.

I highly suggest their basic indicator tutorial to help get you started.

Then you should start looking at the available API, for example Drawxxxx where xxxx is items like Text, Arrow, Diamond, etc... Area/Region allows you to draw a box on the screen.

Many times the API call you want to use has example code in their definition. But you can also google for the call and many times find examples. Also use this forum and the NT Support Forum.

Another thing, if you see an indicator that is doing what you want to do, see if you can get the .cs file (source file). Review the file looking of the API call of interest and get a feel for how it was done there.


Reply With Quote
Thanked by:




Last Updated on October 28, 2013


© 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