Change one of the pair symbols
Author: maninjapan
Creation Date: 11/17/2009 10:18 AM
profile picture

maninjapan

#1
Id like to change one of the fixed symbols to the active symbol. It currently reads ' Stock2 = "MSFT";'
What would I replace MSFT with to refer to the acitve chart?

thanks
profile picture

Eugene

#2
Bars.Symbol is the active symbol.
profile picture

maninjapan

#3
Thanks Eugene, really need to get stuch into learning C#
profile picture

maninjapan

#4
I tried just replacing it, but I guess thats not the way to do it
CODE:
Please log in to see this code.


It compiles fine, but when I run it on a stock, I get a Runtime error: Basis price for position entry cannot be zero.

profile picture

maninjapan

#5
Eugene, jsut wondering if I could get a hand on the above post, still havent been able to figure it out.

Thanks
profile picture

maninjapan

#6
Guessing these threads dont get a whole lot of traffic.
profile picture

Eugene

#7
It's not on the first page. In the future, maybe we'll have a way to show these topics somehow on the Most Recent page.

QUOTE:
It compiles fine, but when I run it on a stock, I get a Runtime error: Basis price for position entry cannot be zero.

How to report a Problem? > the checklist of things is what we need
profile picture

maninjapan

#8
Eugene, point taken on the how to report a problem, however I jsut figured out a fundamental rule in regards to pair trading! you gotta make sure you have the same amount of data for both sides......
It would be good to show new posts here though. Centralized discussions on these strategies would be good
profile picture

icolville@colvillenet.com

#9
I'm trying to code a stop loss exit that will exit both sides of the pair if the net loss on the PAIR (not just one of the positions) is above a certain level. I'm stumped. Its easy to exit a single side/positions using the usual functions but I have no idea how sum the profit/loss of both sides of pair and use that as the determinant for exiting the trade. Any suggestions?
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).