Author: Copyright � 2004, MetaQuotes Software Corp.
Indicators Used
Stochastic oscillator
Miscellaneous
It sends emails
0 Views
0 Downloads
0 Favorites
STOCHALERT
//+------------------------------------------------------------------+
//|                                                    STOCHALERT.mq4 |
//|                      Copyright © 2004, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2004, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

//---- input parameters
extern int       kperiodstoch=5;
extern int       dperiodstoch=3;
extern int       slowingstoch=3;
double Stoch;
double Stochsig;


//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+

 static datetime lasttime = 0; 
 
if (lasttime == Time[0])
   return(0);
lasttime = Time[0];

int  start()
  {
Stoch=iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,0);
Stochsig=iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_SIGNAL,0);
     
   if(Stoch>85)         
      {
      SendMail("STOCH>85 GET READY TO SELL",Symbol());
      Alert ("STOCH>85 GET READY TO SELL",Symbol());         
      }   
   if(Stoch<15)
         
      {
      SendMail("STOCH<15 GET READY TO BUY",Symbol());
      Alert ("STOCH<15 <GET READY TO BUY",Symbol());    
      }   
 }
  {
SendMail("TEST FX Alert", "OPEN " +Open[0] + " LOW " +Low[0] + " HIGH " + High[0] + " BID " +Bid);

Print(" Daily Email Alert Sent "); 
}

   return(0);
 

Comments

Markdown supported. Formatting help

Markdown Formatting Guide

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Link [title](https://www.example.com)
Image ![alt text](image.jpg)
Code `code`
Code Block ```
code block
```
Quote > blockquote
Unordered List - Item 1
- Item 2
Ordered List 1. First item
2. Second item
Horizontal Rule ---