STEP2 – Build the HELLOMQL5TUTORIAL expert advisor with MetaEditor

ARE YOU STILL BROKER FOOD?
EASY AUTOMATED TRADING! 
PRECODED MODULES AND STRATEGIES!
FASTER, BETTER, AUTOMATED RESULTS YOU WILL GET NOWHERE ELSE
CLICK HERE  TO START  NOW

How to make it a working Expert Advisor for MetaTrader 5

To use the code from STEP1 you must compile it. To do this please follow these steps

  1. Start Metatrader 5
  2. Press the F4 key to bring up the MetaEditor
  3. Click on File -> New -> Expert Advisor
  4. Click on Continue and give it the Name ExpertsHELLOMQL5TUTORIAL
  5. Click on Continue and ignore all the radio boxes for further functions
  6. Delete all the code in the text editor
  7. Replace it with this code
void OnTick()
 {
 int Spread;
 Spread=SymbolInfoInteger(Symbol(),SYMBOL_SPREAD);
 Comment("Spread is "+Spread);
 }

Now press the F5 key to compile the Expert Advisor

If everything went right, your MetaEditor window now should look like this

MetaEditorIn Step3 we are going to tell MetaTrader 5 that Expert Advisors should be allowed.

Learn how to create your own MQL5 trading robot for $1
Sign Up Now