Price alert and candle Remaining time AFL ???

#1
Dear friends and Seniors ...,

* i need price alert afl like mt4 Price alert indicator .,.,, in which line should draw accordingly the price mentioned by us and alert with small pop up window should come while price reaches the line ...


* secondly ., i need clock afl to show remaining time of the candle to form new one in any time frame ... ( same like GP clock in MT4 )

plz provide me ....
 

manojborle

Well-Known Member
#4
_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",300,0,1000,1);
y=Param("yposn",50,0,1000,1);

GfxSelectSolidBrush( ColorRGB( 230, 230, 230 ) );
GfxSelectPen( ColorRGB( 230, 230, 230 ), 2 );
if ( NewPeriod )
{
GfxSelectSolidBrush( colorYellow );
GfxSelectPen( colorYellow, 2 );
Say( "New period" );
}
GfxRoundRect( x+45, y+17, x-3, y-2, 0, 0 );
GfxSetBkMode(1);
GfxSelectFont( "Arial", 12, 700, False );
GfxSetTextColor( colorBlack );
GfxTextOut( ""+SecsToGo+" / "+NumToStr( TimeFrame, 1.0 ), x, y );
_SECTION_END();
 

manojborle

Well-Known Member
#5
For Alert pop up

You have to first draw a line, now check properties of line there u can find studyid.

In afl u have to use this studyid and alertif fuction to get a popup alert
 

Similar threads