Here is another alternative
added to chart
Analysis code
added to chart
Code:
su = Study( "SU", GetChartID() ); // support
nm = Name();
uniqueID = "12345";
uniqueName = nm + uniqueID; // static variable of support line depends on symbol and id
StaticVarSet( "SUMaster_" + uniqueName, su); // set static variable dependent on set unique name
StaticVarSetText( "ChartSymbol_" + uniqueID, nm );
Code:
uniqueID = "12345";
nm = StaticVarGetText( "ChartSymbol_" + uniqueID );
uniqueName = nm + uniqueID;
su = LastValue( Nz( StaticVarGet( "SUMaster_" + uniqueName ) ) );
Close_ = Foreign( nm, "C" );
SUcond = Cross( su, Close_ ); // cross of price below suppport
Filter = Status( "LastBarInRange" );
AddTextcolumn( nm, "Chart Ticker", 1 );
AddTextcolumn( WriteIf( SUcond, "True", "False" ), "Support Line Cross DN", 1 );
Addcolumn( Close_, "Chart Price", 1.2 );
Addcolumn( su, "Support", 1.2 );