The following is the code I am using, but it won't print to the chart:
protected override void OnBarUpdate()
{
if (Historical)
return;
if (ToTime(Time[0]) >= ToTime(8, 30, 0) && ToTime(Time[0]) <= ToTime(10, 30, 0))
{
DrawTextFixed("Session","CL IN Session",TextPosition.TopRight);
}
if (ToTime(Time[0]) <= ToTime(8, 29, 0) || ToTime(Time[0]) >= ToTime(10, 31, 0))
{
DrawTextFixed("Session","CL NOT In Session",TextPosition.TopRight);
}
// Logic for long entry
if (long conditions are true)
{
do stuff
}
// Logic for short entry
if (short conditions are true)
{
do stuff
}
}
Any thoughts?

Comment