Download MetaTrader 5
To add comments, please log in or register
Order a robot or an indicator for MetaTrader. The Freelance service will help you!
MACDPRD
10
MACDPRD 2015.03.23 20:10 

Hi

 I am trying to write a simple script to alert me if a pair is close to a resistance or support price. However when I try to use PRICE_HIGH instead of giving me the highest price for that pair in the given time frame, it just gives the value 2.

 See the program I have attempted.

 Any help will be gratefully recieved.

 

Patrick

 

int Count=0;                                    // Global variable

//--------------------------------------------------------------------

int start()                                     // Special funct. start()

   {

   double PRICE_HIGH;

   double Price = PRICE_HIGH;                           // Local variable

   Count++;

   Alert("New tick ",Count,"   Price = ",Price);// Alert

   return;                                      // exit start()

   }

//--------------------------------------------------------------------

int init()                                      // Special funct. init()

   {

   Alert ("Function init() triggered at start");// Alert

   return;                                      // Exit init()

   }

//--------------------------------------------------------------------

int deinit()                                    // Special funct. deinit()

   {

   Alert ("Function deinit() triggered at exit");// Alert

   return;                                      // Exit deinit()

   }

Keith Watford
Moderator
7990
Keith Watford 2015.03.23 20:22  

PRICE_HIGH is not a function, it enumerates to integer 2

Study High[] , iHigh() and iHighest() 

MACDPRD
10
MACDPRD 2015.03.23 21:03  
GumRai:

PRICE_HIGH is not a function, it enumerates to integer 2

Study High[] , iHigh() and iHighest() 

Thanks
whroeder1
13644
whroeder1 2015.03.24 01:41  
Don't paste code
Play video
Please edit your post.
For large amounts of code, attach it.
/
To add comments, please log in or register