Logo

    MA_INDICATOR

    Description

    Calculates the Moving Average indicator and returns its value.

    Important

    All JSON commands you send to MetaSocket should be in a single line format similar to the examples below. Additionally, example replies in this page are presented in a "beautified" format for presentation purposes. Actual replies are always returned in a single line.

    Example

    {"MSG": "MA_INDICATOR","SYMBOL": "EURUSD","TIMEFRAME": "PERIOD_M1","MA_PERIOD": 14,"MA_SHIFT": 0,"MA_METHOD": "MODE_SMA","APPLIED_PRICE": "PRICE_CLOSE"}

    Reply

    {
    "MSG": "MA_INDICATOR",
    "DATA_VALUES": [
    1.183683
    ],
    "ERROR_ID": 0,
    "ERROR_DESCRIPTION": "The operation completed successfully"
    }