Rank: Newbie
Groups: Registered, Registered Users Joined: 6/18/2007(UTC) Posts: 1
|
Hello,
I tried to build a programm for the following system tester:
buy order:
if closing price is higher than moving average 200 days
and
closing price is is lower than the bottom bollinger band (low, 10 days, 1.2)
sell order:
after 10 bars (or working days)
Here is my program:
BUY ORDER:
C>mov(C,200,S)
AND
C<bbandBOT(low,10,q,1.2)
SELL ORDER
BARSSINCE(C>mov (close,200,s)
AND
C<bbandBOT(low, 10, s,1.2)) = 10
The issue is if we have several buy signals, then the sell signal will be given 10 days after the last one and not the first one.
Exemple :
Day 1 buy
Day 2 buy
Day 3 buy
Sell the 13rd days and not the 10th day.
How can I solve it ?
Many thanks for your help.
S.
|
|
|
|
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.