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 );
Trash - I was trying out the analysis but it is giving unpredictable results, I mean it is not showing all the stocks (1-2 are missing) which has crossed the support from top. Not sure why it is happening I will try with more no of stocks and will let you know the results.
Once again thank you very much for immediate solution!!