Professional Documents
Culture Documents
Alerting Regular
Data fetching Data processing
Reporting
Order Trading
Data analysis Charting strategies
management
Automatic Order
execution
Brokers MT4 platform
Back testing
Customized
Alerting Data analytics (ML
algorithms)
Customized Python
charting Automatic data
collection and DB
storage
Chat bot
Program Trading
• Program trading refers to automated monitoring/analysis
and order execution by investors using computer
programs.
• Benefits:
• Become more systematic and disciplined when performing trading
• To collect stock data and perform monitoring automatically
• To perform back testing with the collected data
• To send alerts (email/telegram/sms etc) from system when the trigger happens
• To execute the orders automatically
Why automate your trading
• Time savings
• Could support forex trading on 5x24 basis
• Let the robot trades for you automatically based on your strategies
• More discipline and less human mistakes on trading execution
• Need to define the whole strategy (enter/exit/stoploss etc) beforehand
• Opportunity to scale
• Run the robots on different currency pairs/markets at the same time
• Higher profit potential
• Run multiple strategies at the same times on different currency pairs
• Learn to program
• Learn the programming logic and apply it to other domains
Link to download MT4 platform
• Note: You could go to your favorite broker and download the MT4
platform and get the demo account.
• However for practicing purpose during the course we will share one
of the brokers and setup the demo account.
Terminologies used in FX trading
• Currency pair (e.g. GBPUSD)
• Bid price
• Ask price
• Spread
• Pips
Currency pair
• A currency pair is the quotation of two different currencies, with the
value of one currency being quoted against the other. The first listed
currency of a currency pair is called the base currency, and the
second currency is called the quote currency.
• Currency pairs compare the value of one currency to another—the
base currency (or the first one) versus the second or the quote
currency. It indicates how much of the quote currency is needed to
purchase one unit of the base currency.
Bid/Ask/Spread
• The bid represents the price at which the forex market maker or
broker is willing to buy the base currency in exchange for the counter
currency. Conversely, the ask price is the price at which the forex
broker is willing to sell the base currency in exchange for the counter
currency.
• The bid-ask spread is the difference between the price a broker buys
and sells a currency. So, if a customer initiates a sell trade with the
broker, the bid price would be quoted. If the customer wants to
initiate a buy trade, the ask price would be quoted.
Example
PIPS
A pip is a standardized unit and is the smallest amount by which a
currency quote can change. It is usually $0.0001 for U.S.-dollar related
currency pairs, which is more commonly referred to as 1/100th of 1%,
or one basis point. This standardized size helps to protect investors
from huge losses.
Remark
• For currency pairs displayed to 4 decimal places, one pip = 0.0001
• Yen-based currency pairs are an exception, and are displayed to only
two decimal places (0.01)
Lot size
Example: PIP value calculation
• EURO/USD=1.19823
• Contract value for one lot=100000*1.19823=119823 USD
• Now if the currency moves up by one PIP:
• Contract value for one lot=100000*1.19833=119833 USD
• Gain for one lot=119833-119823 USD=10 USD
Leverage
Indicators/
Scripts/EA
Orders
What MT4 provides
Reference
https://www.investopedia.com/terms/t/trailingstop.asp#:~:text=Using%20a%2010
%25%20trailing%20stop,which%20is%2010%25%20below%20%241%2C010.
Deploy indicators in MT4 platform
• EMA
• RSI
• MACD
• KD
Demo
Install EA in MT4 and perform simple backtesting
Use case of using MT4 platform