Predefined functions not working

 

Predefined functions are not working. They are not turning into Pink color and so I get an error that it is an undeclared identifier. Any ideas??

//+------------------------------------------------------------------+

//|                                         Predefined Variables.mq5 |

//|                                                          Mostafa |

//|                                             https://www.mql5.com |

//+------------------------------------------------------------------+

#property copyright "Mostafa"

#property link      "https://www.mql5.com"

#property version   "1.00"

//+------------------------------------------------------------------+

//| Script program start function                                    |

//+------------------------------------------------------------------+

void OnStart()

  {

//---


   double askPrice = Ask; 

   

  }

//+------------------------------------------------------------------+


Discover new MetaTrader 5 opportunities with MQL5 community and services
Discover new MetaTrader 5 opportunities with MQL5 community and services
  • www.mql5.com
Ask questions on technical analysis, discuss trading systems and improve your MQL5 programming skills to develop your own trading strategies. Communicate and share your experience with traders from anywhere in the world, answer questions and help beginners — MQL5.community is developing along with you. Very easy to solve for you hello...
 
//+------------------------------------------------------------------+

//|                                         Predefined Variables.mq5 |

Try it with a mq4 compiler.

 
Keith Watford:

Try it with a mq4 compiler.

Thanks Keith - So I download Met Trader 4 from https://www.metatrader4.com/en/download but what I get is MetaEditor 5. How do I get the mq4 instead??

Download MetaTrader 4 for PC, iPhone, iPad and Android
Download MetaTrader 4 for PC, iPhone, iPad and Android
  • www.metatrader4.com
Download MetaTrader 4 for PC to receive the most powerful and convenient tool for technical analysis and trading in the markets. During the first launch, you will be prompted to open a...
 
mmaghraby:

Thanks Keith - So I download Met Trader 4 from https://www.metatrader4.com/en/download but what I get is MetaEditor 5. How do I get the mq4 instead??

What is the platform? MT4 or 5?

MT4 compiler is build 2302 (click help then about)

MT5 compiler is build 2361

both are version 5.

 
  1. mmaghraby: How do I get the mq4 instead??

    If you had used this (before posting,) you would have found (among 100+) Where to download MT4? - General - MQL5 programming forum 2017.04.31

    It has been years since you could download MT4 from Metaquotes. You can only get it from a broker's website.
              Where to download the orginal MT4 installer - MQL4 programming forum 2018.01.29

    Or the "clean MT4" download link:
              MT4 download - MT4 - General - MQL5 programming forum #2

  2. Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum
              Messages Editor

 

some prefined functiont s and variables not working , what to do?

example

Ask

Bid

Open[]

Close[]

they are not  turning into pink colour.

 
Nish Anth: some prefined functiont s and variables not working , what to do?

Did you bother to read the answers? #1

 
thNish Anth #:

some prefined functiont s and variables not working , what to do?

example

Ask

Bid

Open[]

Close[]

they are not  turning into pink colour.

the first four are not turning to pink
Reason: