Forum

Merge Multple Alerts in to ONE Variable Alert

Please see code below. I have written code that searches in real-time ALL available markets in MetaTrader and returns their lowest price from the last 10 bars (1 hour period) as an Alert. It is working however the “Alert” results are shown individually for each market. I need ALL the results in ONE

Enum Input and Result Not Working

I am trying to select the input for an Enum using the results of a Function (Symbol). It is not working. I can MANUALLY type the input (Example: EURUSD) and get the correct result. However, if I use the Function (in this case Symbol) it does not work. I've tried every method to convert Symbol() to

Position Value for Entire Account

How might I accurately get the total Position Value for my entire account? I need the total Position Value for all open trades in the account for an EA I am working on (Expressed in the account's home currency). Could someone kindly point me in the right direction or provide example code? I am quite

Search List of Pairs for Corresponding Value

In an EA I need to search a predefined list of currency pairs for a specific pair and return the corresponding value. The pair to be searched for is declared as an input at the start of the script. In the example below, how would I search for "EURCAD" and have it return the value 3.0? extern string

EA or Function to Access OANDA's Margin Requirment Rates

I am using OANDA's version of MetaTrader. I am coding an EA that requires real-time access to Oanda's Margin Requirements Rates.These rates are located here: https://www.oanda.com/resources/legal/canada/legal/margin-rates. How might I access these rates in real-time? Is there a function already