What is all these #define means?

 

Dear All,

I'm very new to mql4, may I know what is all these means?

  • #define SIGNAL_NONE 0
  • #define SIGNAL_BUY   1
  • #define SIGNAL_SELL  2
  • #define SIGNAL_CLOSEBUY 3
  • #define SIGNAL_CLOSESELL 4 
Thank you
 
kai197: I'm very new to mql4, may I know what is all these means?

  • #define SIGNAL_NONE 0
  • #define SIGNAL_BUY   1
  • #define SIGNAL_SELL  2
  • #define SIGNAL_CLOSEBUY 3
  • #define SIGNAL_CLOSESELL 4

They have no real meaning when out of context of the original code. Outside of that code, they are simply mnemonic definitions of constant values that can be used at compile time by their names (also known as Macro Substitution).

EDIT: If you don't know how to code in MQL, then please don't post things here about code generated by EA Builders/Generators. Since you don't understand MQL, you will simply not be able to understand any of the answers we might give you. Here are some quotes from other threads:

FMIC:

Please stop using Code Generators! They produce very bad code and the users here are not going to fix those errors for you. So, you either, learn to code or pay someone to fix it or code a new EA for you (see either the "Documentation", the "Book" or the "Freelance" sections). If you really want to use a Code Generator, then contact the "makers" and have them fix it. They have a Forum too, so post your complaints and a request for fixes there.

WHRoeder:
  1. We hate EA builder
  2. There are only two choices: learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem, but we are not going to debug your hundreds lines of code.
  3. EA builder makes bad code counting up while closing multiple orders.
  4. EA builder makes bad code Bars is unreliable (max bars on chart) volume is unreliable (miss ticks) Always use time
  5. EA builder makes bad code Not adjusting for 4/5 digit brokers
  6. EA builder makes bad code not adjusting for ECN brokers.
  7. EA builder makes bad code not checking return codes.
  8. EATree uses objects on chart to save values - not persistent storage (files or GV+Flush.) No recovery (crash/reboot.)
Reason: