I am not sure why it is not working. This is my code applied to NNDM on Jan25 on the 120min frequency at 7am premarket
//PM_Low variable is Horizontal Line, Low, including premarket
//Prev_High variable is Horizontal Line, PrevHigh, Reg. sessions only
double PM_Low_now = 0;
int DayNum = -1;
public void MainCalculation()
{
if (DayNum != TradingDay.DayNumber)
{
DayNum = TradingDay.DayNumber;
PM_Low_now = PM_Low;
}
else
{
PM_Low_now = Math.Min(PM_Low_now, PM_Low);
}
if (PM_Low_now > 0.98 * Prev_High)
{
SetColor("green", Color.Green);
}
}