Amps

Showing posts with label MT4 Variable. Show all posts
Showing posts with label MT4 Variable. Show all posts

Monday, June 18, 2018

How difference between mt4 input extern

MT4 input extern

Wondering, how difference between MT4 input and extern. Both variable used for specific variable, which in visual programming like, Visual basic, C#, Delphi or Lazarus those would know in properties section.
input and extern in MT4 is the variable, which used in MA, some programmer call global variable 

input

A variable with the input modifier can't be changed inside mql4-programs

extern

extern ones also determine the input parameters of an mql4 program. They are available from the Properties window, values of extern variables can be modified in the program during its operation.


note: photo by doc mql4

Global Variables

Global variables are created by placing their declarations outside function descriptions, they are not local in any block. Global variable can be used in any function of EA.
Example:
int GlobalFlag=10;   // Global variable
int OnStart()
  {
   ...
  }

Short note buy and sell

Open Buy use ask price
TP buy use ask price

Open Sell use bid price
TP sell use bid price