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.
Brian
TS CODE BELOW:
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),
Started(FALSE);
if Date<>Date[1] then
begin
ESYDC = Close[1];
NDQYDC = PriceNDQ[1];
Started=TRUE;
end;
if Started then
begin
ESLevel = Close-ESYDC;
NDQLevel = PriceNDQ-NDQYDC;
end;
Plot1(ESLevel,"es");
Plot2(NDQLevel,"ndq");
Plot3(0,"zero");
if Date<>Date[1] then begin
Print("");
Print("");
end;
Print(Date:10:0,Time:6:0,"ES=",ESLevel," NQ=",NDQLevel);
Comment