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.
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.
The following user says Thank You to tulanch for this post: