I am new to ninja trader development and trying to see if anyone can help me to create an indicator that plots current days price + or - to previous days close as of 4:15pm EST on each bar of the current day as a histogram.
ie; ES close previous day 982.00 & Current 5min or whatever period bar closes at 984.00
so histogram at close of current bar below it would plot, +2.00
or if current bar closed at 980.00 then the histogram at close of bar below it would plot, -2.00
If anyone could put me on the path or show me how that would be written in ninja, I would greatly appreciate it! God Bless and Good Trading To All.
welcome to the forum there bud. i see you and i think alike it seems because this is exactly the kind of work i like to do and discover and research. i think this type of method has much more value than traditional indicators.
thinking out loud...
i think that will get you the prev day close and account for weekends and lack of historical data, etc.
then you need to compare that value vs current close of last bar... something like:
you should be able to then plot that difference easily if you've ever written any indicator before. once you have the final product please do post it back and share it!
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
Last edited by caprica; August 3rd, 2009 at 03:42 AM.
Reason: corrected type-o in code
The following user says Thank You to caprica for this post:
Thanks for this code, I will play around and see if I can get what I want from here and then I will repost as requested. Since I am new here, when I get it the way I want it you will be the first to know!
Here is an exact copy of the TS code I am trying to Reproduce in NinjaTrader,
I am not sure, but I don't think I can have 2 symbols on the same chart in NinjaTrader, like you can in TS so I am only interested in the Plot working for the current symbol that I would be able to place the indicator on. If I needed to place 2 seperate charts up to get the same effect as TS with 1 chart that would be fine also. Thanks all, Brian.
Inputs: PriceES(Close of Data1),
PriceNDQ(Close of Data2);
Vars: ESLevel(0), NDQLevel(0), ESYDC(0), NDQYDC(0),
if Date<>Date then
ESYDC = Close;
NDQYDC = PriceNDQ;
if Started then
Caprica, you did all the hard work, I just threw it into an indicator
Its too early to tell if the indicator is useful. It seems to be one of those that intuitively should provide a good insight - I personally think yesterdays closing, high and low do influence trading today, however I won't be using it as part of my ATS.