Click here to Login

                                                   How to trade one symbol based on indicators of another?


2011-01-17 08:42:19

... A basic question: How do I build a trading system, and/or a set of trading rules, where indicators and operations on indicators of one symbol trigger trades of another symbol?

For example, buy INTC if the ^NDX rsi(14) crosses above 20, or buy QQQQ if ^GSPC crosses above its upper bollinger band?

2011-01-17 09:29:11


Best Answer
- Buy a security if the ^NDX rsi(14) crosses above 20

a = GetSeries("^NDX", close);
buy = cross(Rsi(a, 14), 20);

If you want to buy only INTC:

a = GetSeries("^NDX", close);
buy = cross(Rsi(a, 14), 20) AND StringEqual(Name(), "INTC");

Or you can use the Advanced Money Management Tool.

- Buy a security if ^GSPC crosses above its upper bollinger band

a = GetSeries("^GSPC", close);
buy = cross(a, BbandsUpper(a, 20, 2, _MaSma));

No more messages


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"


Trading Items
Market Rule based on the Crossover Between Stock Close prices and...
Export Indicators Data with Filtering and Column Labels Support
Trade Weighted Exchange Index
Adaptive Trading Indicator based on the Return of Past Trades
Money management to Reject Trading Positions Based on their Past ...

How-to Lessons
How to create and trade a Neural Network model
How to drag & drop indicators in charts
How to quickly select stocks based on the last value of a databas...
How to rename a ticker symbol
How to create trading rules based on Put and Call volume data

Related Forum Threads
How do I refer to the close price of another symbol in a formula?
How can I associate a field (value) to a trade in a MM script?
How to import Bid, Ask and Trade ticks from CSV file?
How can I build an Indicator, based on database data.
Indicator based on another symbol in another timeframe

Blog Posts
Update Chart Layout based on Active Ticker Symbol
3 Market Indicators based on Fundamental Data
How to create buy and sell trading rules based on News Data
How to predict and trade the stock market using pivot points
How to create market indicators using the composite function - Pa...

Create an account
Affiliate Program
Contact Us
Trading Forum
How-to Lessons
About Us
Terms of Use

Copyright 2021
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
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.