Skip to content

Instantly share code, notes, and snippets.

@marketcalls
Created April 17, 2016 05:43
Show Gist options
  • Save marketcalls/a6c62d8e6bdf9af4129a877782813917 to your computer and use it in GitHub Desktop.
Save marketcalls/a6c62d8e6bdf9af4129a877782813917 to your computer and use it in GitHub Desktop.
Pop up Framework
function PopupWindowEx( popupID, bodytext, captiontext, timeout, left, top )
{
displayText = bodytext + captiontext;
if ( ( StaticVarGetText( "prevPopup" + popupID ) != displayText) OR ( StaticVarGet( "prevPopupTime" + popupID ) < GetSecondNum() ) )
{
StaticVarSetText( "prevPopup" + popupID, displayText);
StaticVarSet( "prevPopupTime" + popupID, GetSecondNum() + timeout );
PopupWindow( bodytext, Captiontext + popupID, timeout, Left, top );
PlaySound("c:\\windows\\media\\ding.wav");
}
}
if (Buy[BarCount-2]==true)
{
PopupWindowEx( "ID:1", "Get Ready to BUY \n"+Name() + " "+ Interval(2)+" : "+ " Last ="+LastClose , "Buy Alert -", 1000, 100, 1 ) ;
}
if (short[BarCount-2]==true)
{
PopupWindowEx( "ID:2", "Get Ready to SHORT \n"+Name() + " "+ Interval(2) + " : "+ " Last ="+LastClose , "Short Alert ", 1000, 1, 150 ) ;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment