Current location - Education and Training Encyclopedia - Education and training - What is the difference between Symbol () and NULL in EA programming of mt4?
What is the difference between Symbol () and NULL in EA programming of mt4?
NULL means blank and refers to the default currency pair. If you pull ea on the chart of that currency pair, it refers to that currency pair.

Null also indicates the default calculation method of the default chart and so on.

Symbol () allows you to read the data of other currency pairs in any chart (strategy test failed) and is also used to "prevent ea from running on the wrong chart". For example, adding smybol==gbpusd in the open condition stipulates that this ea can only be used as gbpusd.

Add: I can't code, just an idea. Specific code writing can be found in the mt4 help file.