Pairs trading issue - ThinkOrSwim Programming | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > ThinkOrSwim > ThinkOrSwim Programming

Pairs trading issue
Started:July 25th, 2014 (09:50 AM) by bogdan Views / Replies:737 / 1
Last Reply:July 25th, 2014 (10:00 AM) Attachments:1

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

Pairs trading issue

Old July 25th, 2014, 09:50 AM   #1 (permalink)
Trading Apprentice
Kiev, Ukraine
Futures Experience: Intermediate
Platform: ThinkOrSwim
Favorite Futures: Stocks
Posts: 1 since Jul 2014
Thanks: 0 given, 0 received

Pairs trading issue


Please help me solve problem with thinkscript. I will be very grateful for help or any ideas.

Pair trading is my strategy. I would like to link 3 chart windows. First one I using for displaying pair chart (for example AAPL/MSFT). Second and third I using for displaying single charts (for example AAPL on second window and MSFT on third). I link all of these windows and would like to receive all charts by selecting only one pair in first window.

My problem that I can't find necessary thinkscript functional for ploting bar chart by symbol.

I write the next script:

declare lower;
def value = close(GetSymbolPart(1)) / close(GetSymbolPart(2));
def isInverted = if value > 1 then no else yes;
def tickerIndex = if isInverted then 1 else 2;
plot chart = close(GetSymbolPart(tickerIndex));
But this script plots only close line. I would like to plot bar chart. Is it possible? Or maybe exists some unique charts linking method in thinkorswim software?

Thank you so much!

Reply With Quote

Old July 25th, 2014, 10:00 AM   #2 (permalink)
1.Fibs 2.??? 3.Profit
Puerto Rico
Futures Experience: Intermediate
Platform: thinkorswim
Broker/Data: TD Ameritrade
Favorite Futures: CL & ES
rmejia's Avatar
Posts: 378 since Oct 2010
Thanks: 3,524 given, 404 received

Not sure if this is what you are trying to do, but there is a link chart button to the right of the symbol input area:

Please register on to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Edit: I re-read what you wrote and I don't think there is a way to link a pair chart to make it split into the two separate symbols. The pair symbol is read as 1 symbol.

Last edited by rmejia; July 25th, 2014 at 11:27 AM.
Reply With Quote

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > ThinkOrSwim > ThinkOrSwim Programming > Pairs trading issue

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
Algorithmic pairs trading sysot1t Elite Automated Trading 64 April 8th, 2015 06:52 PM
Anyone Do Stock Pairs Trading? MedianVelocity Stocks and ETFs Trading 3 February 28th, 2014 05:18 AM
Pairs Trading - Again, Finding Industries veng1 Elite Automated Trading 8 February 6th, 2012 09:20 AM
Spread / Pairs trading indicators Mehul Stocks and ETFs Trading 3 November 13th, 2011 03:54 PM

All times are GMT -4. The time now is 11:19 AM.

Copyright © 2016 by All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts

Page generated 2016-10-26 in 0.08 seconds with 20 queries on phoenix via your IP