Bid High Low Alert

Download script
Bid High Low Alert

This script functions as an automated price monitoring tool designed to alert you when market prices move outside of a specific range that you have defined. Instead of requiring you to watch charts constantly, the script acts as a digital watchdog for your designated boundaries.

How it Works

The logic operates based on three main components:

1. User-Defined Boundaries At the start, the system allows you to set two specific price points: a Low Price and a High Price. These serve as the "safety zone" or the "active range." You determine these levels based on your personal trading strategy or specific market interests.

2. Constant Market Observation The script continuously scans the most recent completed 30-minute candle on the chart. It specifically looks at three data points from this period:

  • The highest price reached.
  • The lowest price reached.
  • The final closing price (which is the primary focus for the alert).

3. The Alert Trigger The core logic compares the Closing Price of that 30-minute candle against your pre-set boundaries. The system triggers an action if either of the following conditions occurs:

  • The price closes below your designated Low Price.
  • The price closes above your designated High Price.

Summary of Action

Whenever the market closes outside of your specified range, the script will immediately trigger an audible alert (a sound file). If the price remains within your boundaries, the script remains silent and continues to monitor the next period. This allows you to stay informed about significant price breakouts without needing to manually track every price fluctuation.

Price Data Components
Series array that contains the highest prices of each barSeries array that contains the lowest prices of each barSeries array that contains close prices for each bar
Miscellaneous
It plays sound alerts
11 Views
0 Downloads
0 Favorites
Bid High Low Alert

extern double lowPrice = 1.2345;
extern double highPrice = 1.6789;
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
double close,hi,lo;
int start()
  {
hi=iHigh(NULL,PERIOD_M30,1);
lo=iLow(NULL,PERIOD_M30,1);
close=iClose(NULL,PERIOD_M30,1);
      if(close<lowPrice||close>highPrice)
        {
         PlaySound("alert.wav");
        return(0); 
        }
   return(0);
  }
// the end.

Comments