Hi,

The _N(Title) syntax is a bit tricky for a non-programmer.

After many attempts, the following formula gives me the title appearance I wish.

Unfortunately, the popup window when hovering above the candles did not give 
the OHLC as with the native formula.
I get {{NAME}} - {{INTERVAL}} {{DATE}} \c07 etc.

What is wrong with my titles lines ?

Thank you for your help.

Best regards



// remaining time
// test to place remaining time at the end of first line

SetChartOptions( 0, chartShowArrows | chartShowDates );
Plot( C, "", ParamColor("Color", colorBlack ), styleCandle ); 

// Seconds Remaining

function GetSecondNum()
{
    Time       = Now( 4 );
    Seconds    = int( Time % 100 );
    Minutes    = int( Time / 100 % 100 );
    Hours    = int( Time / 10000 % 100 );
    SecondNum = int( Hours * 60 * 60 + Minutes * 60 + Seconds );
    return SecondNum;
}

TimeFrame = Interval();
SecNumber = GetSecondNum();
SecsLeft    = SecNumber - int( SecNumber / TimeFrame ) * TimeFrame;
SecsToGo    = TimeFrame - SecsLeft;
Secsleft = SecsToGo % 60 ;
Minleft = int( SecsToGo / 60 );

Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} ")+ "\\c07 " +  Minleft + 
"\\c07 : " + "\\c07 " + Secsleft ;
_N( Title = Title + StrFormat( "\n\\c01Op %g, \nHi %g, \nLo %g, \nCl %g 
(%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ) );


Reply via email to