PureBytes Links
Trading Reference Links
|
I have run against another very disturbing problem lately trying to check if systems
written in AFL can enter trades with entry prices other than Close, Open etc. known from
Metastock.
I have used the simplest system I could think of which buys when price crosses above
Ref(High,-1) and goes short when it crosses below Ref(L,-1), please find the formula
below. The problem is, Amibroker would take only some trades and wouldn't touch the
others :-(( Please see the attached .gif with 2 such situations described.
Do I get it all wrong? Or something wrong with the formula? Please help...
Thanks,
Yarroll
PS. I tried to trim the size of the gif, I got it as low as I could, sorry if it's still
large at 14 KB.
***
BuyStop =Ref(High,-1);
SellStop = Ref(Low,-1);
Buy = Cross( High, Ref(High,-1) );
Sell = Cross( Ref(Low,-1), Low);
Short = Cross( Ref(Low,-1), Low);
Cover = Cross( High, Ref(High,-1));
BuyPrice = Max( BuyStop, Low );
SellPrice = Min( SellStop, High );
CoverPrice = Max( BuyStop, Low );
ShortPrice = Min( SellStop, High );
Attachment:
gif00286.gif
Attachment:
Description: "Description: GIF image"
|