Weird Pair trading Daily Scale Error
Author: gregg
Creation Date: 4/6/2009 5:26 PM
profile picture

gregg

#1
Hi,
I have a pair trading system that uses both minute (by default) and daily (using SetScaleDaily) data.

I use a couple of daily indicators as entry signals, but run RestoreScale(); right afterwards.

Anyways When I place an order on the second symbol
CODE:
Please log in to see this code.


It executes at the previous days's Close even though, the scale is minute data.

Any ideas?
profile picture

Wall

#2
QUOTE:
ShortAtClose(bar-1,String.Format("{0:0.0000}", ratio1[bar]) );


Why are you using bar-1 ?
profile picture

gregg

#3
I was just testing whether entry price would be different for bar / bar -1 / bar + 1 etc ... they all go to the daily price.
profile picture

Eugene

#4
Calling RestoreScale right away is a prerequisite, great that you're doing it. Can you post more code?
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).