Click here to Login





                                                   backtesting on currency pairs

  0

0
alec
2015-02-02 11:00:06


Im backtesting a strategy for currency pairs and would like to know if anyone could tell me how i would write a formula using the wizard for a buy rule that
stipulates to only buy when the base currencies countries stock market index is above a 30 period moving average. If it is not possible to write this buy rule
for a group of currency pairs then i would like to know if it is possible to individualy backtest a currency pair using this condition. Much appreciated any
help.



QuantShare
2015-02-03 03:03:08

  0

Hi,

You could use the "GetSeries" function to reference another symbol (stock market index for example)

Using the formula editor this can be translated into:

s = getseries("SYMBOL", close);
a = s > sma(s, 30);
buy = a;

You can also add that using the wizard, by adding the "Getseries" function in the first line then adding the moving average in the second line and in the "Param" control click on "+" to select the "Getseries" again: sma(getseries("SYMBOL", close), 30)



alec
2015-02-03 17:27:37

  0

cheers!!!



No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Currency Pairs Calendar Data
One-Minute Intraday Data for Currency Pairs
Currency Mgmt v 0.9
Currency Trading News from Yahoo - Forex Market
31 Forex Pairs Historical Data

How-to Lessons
How to plot the number of stock tweets per day
How to display Forex economic calendar data in a chart
How to import trading items from other accounts
How to plot the relative performance of several stocks/indices
How to get stocks for a particular index using the global script

Related Forum Threads
Multi Currency Stock Portfolio Backtesting
Multi currency functionality
Pairs trading
Currency Futures - India
Trading strategy backtesting

Blog Posts
Backtesting Process
Backtesting All Candlestick Patterns in 10 Minutes
Create a HTML or PDF Report of your Trading System Backtesting Re...
Backtesting trading strategies using intraday data
Getting Accurate Backtesting Results: Survivorship bias-free S&P ...









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.