PureBytes Links
Trading Reference Links
|
Balin --
I think your problem lies in the meaning of the word 'stop'. AB uses
'stop' to mean a price that increases as the price increases. You want
a fixed minimum sell price. The easiest way is for you to not use the
word 'stop' for what you want to do. You just want to 'sell' when the
price falls below your price. Your broker calls this a 'stop' but AB
doesn't.
HIrange = 55;
LOrange= 40;
// stop=1; // not even going to use the word 'stop'
fallback = 1; // the level
below the high on the day you bought
/* find out channel borders */
channeltop = Ref( HHV( High, HIrange ), -1 );
channelbottom = Ref( LLV( Low, LOrange ), -1 );
Buy = High > channeltop;
Sell=Low<Channelbottom OR Low<Ref(H, -BarsSince(Buy))-fallback;
// ApplyStop(0,2,stop,0,0); // your not doing an AB stop
Hope this helps.
-- Keith
balin8425 wrote:
HIrange = 55;
LOrange= 40;
stop=1;
/* find out channel borders */
channeltop = Ref( HHV( High, HIrange ), -1 );
channelbottom = Ref( LLV( Low, LOrange ), -1 );
Buy = High > channeltop;
Sell=Low<Channelbottom;
ApplyStop(0,2,stop,0,0);
What it's supposed to do: Stop out if the price drops 1 point below
the high on the day of the buy.
What it does: Stop out any time the price drops 1 point below it's
previous highest high.
I thought the volatile=false (5th parameter in Applystop) would fix
this, but it didn't. Do I have something wrong with my Buy signal
that causes it to keep buying... or what?
I'm new, I'm trying, but 2 days I've been working on this and I
still don't get it.
Thanks, Balin
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
|