I am trying to make the following indicator I have started it but I am not familar with NT script could it please be finished. All the logic is there.
I am trying to achieve this 'Upbar' is simply defined as a bar where the open is in the lower 33% and the close is in the upper 33% of the candle. A downbar is the opposite of this.
int RangePercent = 33;
double range;
protectedoverridevoid OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
//Plot0.Set(Close[0]);
if (RangePercent > 0)
{
double range = High[0]-Low[0];
if (High[0]-Close[0] < range * RangePercent*100 && Open[0]-Low[0] < range * RangePercent*100)
{
Paint the bar blue
elseif (Close[0] - Low[0] < Range*RangePercent/100 && High[0] - Open[0] < Range*RangePercent/100)
{
Paint the bar red
}
}
}
}
thanks,
Trader
Comment