logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
sajmon2007  
#1 Posted : Saturday, October 30, 2010 2:21:05 PM(UTC)
sajmon2007

Rank: Newbie

Groups: Registered, Registered Users
Joined: 11/8/2008(UTC)
Posts: 3

Hi, I am trying to use the following sample code: buy long/buy to cover: H>=O+parameter sell long/sell short: L<=O-parameter Positions are opened intraday with delay=0. The problem is that there are days when both signals appears(buy and sell). Metastock resolves it only with "order bias" option and always sells my long position and again enters long. I would like to build the system in such a way, that when both signals appears it reverse any previous position(i.e. when it was long before, it enters short). I was trying different techniques without success :/ Even using something like Ref(Simulation.LongPositionCount,-1)=1 to check if in previous bar I had long position so I can short sell when I have a day with both signals. However, it doesn't work somehow. I'll appreciate your hints.
sajmon2007  
#2 Posted : Saturday, October 30, 2010 2:24:09 PM(UTC)
sajmon2007

Rank: Newbie

Groups: Registered, Registered Users
Joined: 11/8/2008(UTC)
Posts: 3

somehow sell signal was wrongly posted sell long/sell short: L<=O-parameter
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.