//+------------------------------------------------------------------+ //| Equity Alert.mq4 | //| Copyright © 2009, MetaQuotes Software Corp. | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "Copyright © 2009, MetaQuotes Software Corp." #property link "http://www.metaquotes.net" #property indicator_chart_window extern bool AlertOn = true; extern double AlertWhenBelow = 1000.00; datetime once = 0; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- Comment(""); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { if ( AccountEquity() < AlertWhenBelow && once != Time[0] && AlertOn ) { Alert(" AccountEquity is Below ", AlertWhenBelow); once = Time[0]; } Comment( "Account Equity is ", AccountEquity(), "\nAccount Balance is ", AccountBalance(), "\nAlert When Drops Below ", DoubleToStr(AlertWhenBelow,2) ); //---- //---- return(0); } //+------------------------------------------------------------------+