Day Trading Stocks & Futures

re: Day trading Nifty & Banknifty Futures

Expecting this correction to be flat/shallow. NF may not go below 7400 before the budget.

The next trigger for the upmove will be budget.If we dont see too many populist proposals in budget, it will give a good foundation for the bull market to build further.

Smart_trade
 

Snake.Head

Well-Known Member
re: Day trading Nifty & Banknifty Futures

how can we get time stamp (hh:mm:ss) on chart. is there any afl.
i searched web for that. but not found.
TimeLeft in Bar
@edit per you need
Code:
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;
}
 
RequestTimedRefresh( 1 );
TimeFrame = Interval();
SecNumber = GetSecondNum();
Newperiod = SecNumber % TimeFrame == 0;
SecsLeft	 = SecNumber - int( SecNumber / TimeFrame ) * TimeFrame;
SecsToGo	 = TimeFrame - SecsLeft;
 
Title = ParamToggle("Timer","No|Yes",1);
if (Title) 
  
Title = "\n" +
        "Current Time: " + Now( 2 ) + "\n" +
        "Chart Interval: " + NumToStr( TimeFrame, 1.0 ) + " Seconds\n" +
        "Seconds Left: " + NumToStr( SecsLeft, 1.0, False ) + "\n" +
        "Seconds To Go: " + NumToStr( SecsToGo, 1.0, False );
 

kiran_thiru

Well-Known Member
re: Day trading Nifty & Banknifty Futures

TimeLeft in Bar
@edit per you need
Code:
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;
}
 
RequestTimedRefresh( 1 );
TimeFrame = Interval();
SecNumber = GetSecondNum();
Newperiod = SecNumber % TimeFrame == 0;
SecsLeft	 = SecNumber - int( SecNumber / TimeFrame ) * TimeFrame;
SecsToGo	 = TimeFrame - SecsLeft;
 
Title = ParamToggle("Timer","No|Yes",1);
if (Title) 
  
Title = "\n" +
        "Current Time: " + Now( 2 ) + "\n" +
        "Chart Interval: " + NumToStr( TimeFrame, 1.0 ) + " Seconds\n" +
        "Seconds Left: " + NumToStr( SecsLeft, 1.0, False ) + "\n" +
        "Seconds To Go: " + NumToStr( SecsToGo, 1.0, False );
thank you Snake.Head sir. it is very useful to me.
:clap::clap::clap:

but when i uses time afl, my chart not shows price OHLC. how can i get display both.
 

kiran_thiru

Well-Known Member
re: Day trading Nifty & Banknifty Futures

No sir please
Only problem in above code is if i try to drag in price chart then O, H, L, C is replaced by time...
need to figure and correct code.
ok. thank you. waiting for correct code.
 

josh1

Well-Known Member
re: Day trading Nifty & Banknifty Futures

No sir please
Only problem in above code is if i try to drag in price chart then O, H, L, C is replaced by time...
need to figure and correct code.
Code:
_SECTION_BEGIN("Time Left");

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;
}
//RequestTimedRefresh( 1 );
TimeFrame = Interval();
SecNumber = GetSecondNum();
Newperiod = SecNumber % TimeFrame == 0;
SecsLeft = SecNumber - int( SecNumber / TimeFrame ) * TimeFrame;
SecsToGo = TimeFrame - SecsLeft;

x=Param("xposn",1,0,1200,1);
y=Param("yposn",430,0,1000,1);

//GfxSelectSolidBrush( ColorRGB( 230, 230, 230 ) );
//GfxSelectPen( ColorRGB( 230, 230, 230 ), 2 );

if ( NewPeriod )
{
//GfxSelectSolidBrush( colorYellow );
//GfxSelectPen( colorBlue, 2 );
Say( "New period" );
}
//GfxRoundRect( x+45, y+40, x-3, y-2, 0, 0 );


//File: TimeLeft in Bar
//Sept 20, 2005
// Compute Time Left In Bar
//

BarTime1   = LastValue(TimeNum() - Now(4));
DataError  = IIf(Now(4) > TimeNum(),True,False);
TimeBase   = IIf(Interval(1)>0,1,0);


_N(StrBarTime = NumToStr(BarTime1,1.0,False));
BT_Length     = StrLen(StrBarTime);


_N(TimeLeft_    =
WriteIf(BT_Length==1,"0:0"+StrBarTime,WriteIf(BT_Length==2,"0:"+StrBarTime,
                
WriteIf(BT_Length==3,StrLeft(StrBarTime,1)+":"+StrRight(StrBarTime,2),
                   StrLeft(StrBarTime,2)+":"+StrRight(StrBarTime,2)))));

TimeLeft   = WriteIf(TimeBase==1,TimeLeft_,"N/A");

GfxSetBkMode(2);
GfxSetBkColor( colorBlack );
GfxSelectFont( "Arial", 14, 700, False );
GfxSetTextColor( ParamColor("ColorTimeLeft",colorGold ));
GfxTextOut("Time Left :"+SecsToGo+"", x, y );
GfxTextOut( Now(2)+ "  " + TimeLeft, x, y-18 );

_SECTION_END();
Adjust X Y position on chart in Parameters
 

Similar threads