October 1st, 2011, 10:53 PM
C# NinjaScript Walkthrough
Iím trying to make a technical indicator for trading futures as Iím just a beginner. I just want to make it so that I can have a way of easily recognizing what is called a trend line. The program I use is called ninjatrader and with this I view the chart to trade from. Hereís what Iím looking to try and do. First letís start off with every hour I want the data to begin being tracked and end at the end of that hour. Then the next hour I want the same(I want the data to be tracked) now if the data in the second bar shows that the price of what is being traded had a higher low then the previous hour I want to draw a line automatically from the first hour low to the second hour low. Also at the same time I want the first hour and second hour high to be determined. Same thing here - if the high of the second hour high was lower than the hour of time before then I want a line drawn that extends indefinitely as well from the high of each hour. These both have to happen at the same time though meaning the second hour low at completion of second hour needs to be a higher value then the first hours low and the second hours high needs to be less than the first hours high(sort of forming a wedge visually.) Once this happens these lines will stay until a new set of 2 hour time span meets this criteria(first hour and second hour)
I have no idea really where to start. Iím doing my best to try and understand this, but I feel like what Iím trying to do is far to advanced. I donít want it to place trades I just want it to place the lines as seen in the below image. The lines that connect the highs or lows and extend until a new set of criteria is met causing the previous lines to disappear and the new lines to reappear. Hereís the program used and where to download the demo. The code is something called ninjascript which is c# I believe. http://www.ampcleari...m/CQGNTdemo.php
Thanks for guiding me through this.
Note: my biggest problem here is figuring out how to set everything up. I have a syntax for which I can in some ways discover ways of doing this, but like I said I'm only a beginner. If someone can walk me through this I would forever be in debt. Hopefully I can improve my trading with this visual aid and maybe help you guys in some way!
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!