Click here to Login








Base or Counter Currency

by Tom Huggens, 5305 days ago
Share |






This simple function can be used in Forex trading; it returns for a given symbol whether the specified currency is the base currency or the counter/quote currency.

The function is named "isbase", it accepts the currency name and it returns one if the specified currency is the base currency, minus one if the specified currency is the counter currency and zero if the specified currency does not belong to the current symbol.
For example, if you are working with the EURUSD forex pair, the following formula: isbase("USD"), returns -1.

This Forex function can be used in different scenarios:
Create a conditional trading rule that uses different rules depending on whether the currency tested is the base currency of the pair or not.
Create a composite index that creates an index for a particular currency. In this case, you must be able to detect whether the currency is a base currency and modify the calculation accordingly. For example, if you want to calculate the number of times the USD closed higher against other currencies, you should use "close > ref(close, 1)" in case USD is the base currency and "close < ref(close, 1)" in case the USD if the counter currency.

Forex Pairs historical data can be downloaded using one of the following downloaders:
Forex Quotes downloads EOD quotes for the following forex pairs: CHFJPY, EURCHF, EURGBP, EURJPY, EURUSD, GBPUSD, USDCHF, USDDEM (U.S Dollar / Germany Deutsche Mark), USDJPY, USDRUB (U.S Dollar / Russian Ruble)
Futures and Forex historical data gets historical data for futures, as well as for the following forex pairs: AUDJPY, AUDUSD, AUDCAD, GBPJPY, GBPCHF, EURAUD, EURCAD, EURJPY, EURCHF, EURGBP, EURUSD, USDCAD, USDJPY, USDCHF, GBPUSD, USDCNY (U.S Dollar / Chinese Yuan), USDINR (U.S Dollar / Indian Rupees), USDBRL (U.S Dollar / Brazilian Real), USDKRW (U.S Dollar / Korean Won)


Share This ->
Share |


You have to log in to bookmark this object
What is this?
Additional Information




Type: Trading Indicator

Object ID: 422


Country:
All

Market: Forex Market

Style:
All

Reviews
You must log in first

Join now
and get instant access for free to the trading software, the Sharing server and the Social network website.
Click here


Related objects

Empty

Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object

Technical Analysis


Fundamental Analysis



Random Blog Posts

How to create custom databases in your trading software

Technical Analysis Using Multiple Timeframes - Second Part

New features in QuantShare - Trading Software

Technical Analysis Using Multiple Timeframes

Short Index - Part 2

Short Index - Part 1

Trend Following and Moving Averages

Put-Call Ratio for Individual Stocks

Show All

Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object






QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.