I am just starting to learn to program in order to be able to program in NinjaScript.
I would like to create a simple indicator that plots three bar mid points
(High + Low)/2
(Open + Close)/2
(High + Low + Open + Close)/4
I managed to do so in TOS (it took three lines)
I followed the tutorials in the NT7 help file. However, there it looks like there are some syntax changes. The example given in NT7, is "Plot0.Set( .....)". this doesn't seem to work in NT8.
I believe my problem is with the syntax within OnBarUpdates()
protected override void OnBarUpdate()
{
//Add your custom indicator logic here.
HLmid = (High[0] + Low[0])/2;
OCmid = (Open[0] + Close[0])/2;
ALLmid = (High[0] + Low[0] + Open[0] + Close[0])/4;
}
The complete NinjaScript file is attached.
Thanks in advance!
Comment