Discussions
»
Product and Service Development
»
Formula Assistance
»
long and sell signal on the same day problem - system tester
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.
|
|
|
|
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)
|
Discussions
»
Product and Service Development
»
Formula Assistance
»
long and sell signal on the same day problem - system tester
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.