PureBytes Links
Trading Reference Links
|
This is my first attempt to run an exploration, and I
have questions and also
problems.
The idea is to buy when stochk(14) crosses up through
stochd(14). The position will then be held till until the
Cross(stochkd(14),stochk(14)) occurs.
The first time that I run it, I want
to set this Exploration to run on only one historical day,
so I will set the AA range from 9/2/03 to 9/2/03, and I will
leave the n= box set at 1. Are these the correct range settings
to run it on only one day?
Also, this is my first attempt to use ValueWhen, and
BarsSince. Does it look correctly coded to do what I am wanting to
do? Maybe my AddColumns
are also incorrect.
Additionally,When I try to run it, I get
a syntax error at the right side end of the SellStocVal line of code.
All help will be appreciated. Ron
D
BuyStocVal=ValueWhen<FONT
size=1>(Cross(<FONT
color=#0000ff size=1>StochK(<FONT color=#ff00ff
size=1>14),<FONT color=#0000ff
size=1>StochD(<FONT color=#ff00ff
size=1>14)),<FONT color=#0000ff
size=1>StochK(<FONT color=#ff00ff
size=1>14),1<FONT
size=1>);
SellStocVal=ValueWhen<FONT
size=1>(Cross(<FONT
color=#0000ff size=1>StochD(<FONT color=#ff00ff
size=1>14),<FONT color=#0000ff
size=1>StochK(<FONT color=#ff00ff
size=1>14)),<FONT color=#0000ff
size=1>StochK(<FONT color=#ff00ff
size=1>14),<FONT color=#0000ff
size=1>BarsSince(<FONT color=#0000ff
size=1>Cross(<FONT color=#0000ff
size=1>StochK(<FONT color=#ff00ff
size=1>14),<FONT color=#0000ff
size=1>StochD(<FONT color=#ff00ff
size=1>14)));
StocRise=SellStocVal-BuystocVal;
Entryprice=ValueWhen<FONT
size=1>(Cross(<FONT
color=#0000ff size=1>StochK(<FONT color=#ff00ff
size=1>14),<FONT color=#0000ff
size=1>StochD(<FONT color=#ff00ff
size=1>14)),<FONT color=#0000ff
size=1>Ref(Open,<FONT color=#ff00ff
size=1>0),1<FONT
size=1>);
Exitprice=ValueWhen<FONT
size=1>(Cross(<FONT
color=#0000ff size=1>StochD(<FONT color=#ff00ff
size=1>14),<FONT color=#0000ff
size=1>StochK(<FONT color=#ff00ff
size=1>14)),<FONT color=#0000ff
size=1>Ref(Open,<FONT color=#ff00ff
size=1>0),<FONT color=#0000ff
size=1>BarsSince(<FONT color=#0000ff
size=1>Cross(<FONT color=#0000ff
size=1>StochK(<FONT color=#ff00ff
size=1>14),<FONT color=#0000ff
size=1>StochD(<FONT color=#ff00ff
size=1>14)));
Pricerise=Exitprice-entryprice;
percentrise=pricerise/entryprice;
Filter=Buystocval AND Sellstocval AND stocrise
AND entryprice AND exitprice AND pricerise;<FONT
color=#0000ff size=1>
AddColumn(<FONT color=#0000ff
size=1>StochK(<FONT color=#ff00ff
size=1>14),"Buy
Value"format=<FONT color=#ff00ff
size=1>1.2<FONT
size=1>,textcolor=colorDefault,bkgndcolor=colorDefault);<FONT
color=#0000ff size=1>
AddColumn(<FONT color=#0000ff
size=1>StochK(<FONT color=#ff00ff
size=1>14),"Sell
Value"format=<FONT color=#ff00ff
size=1>1.2<FONT
size=1>,textcolor=colorDefault,bkgndcolor=colorDefault);<FONT
color=#0000ff size=1>
AddColumn(<FONT color=#0000ff
size=1>StochK(<FONT color=#ff00ff
size=1>14),"Stoc
Rise"format=<FONT color=#ff00ff
size=1>1.2<FONT
size=1>,textcolor=colorDefault,bkgndcolor=colorDefault);<FONT
color=#0000ff size=1>
AddColumn(<FONT color=#0000ff
size=1>StochK(<FONT color=#ff00ff
size=1>14),"Buy
price"format=<FONT color=#ff00ff
size=1>1.2<FONT
size=1>,textcolor=colorDefault,bkgndcolor=colorDefault);<FONT
color=#0000ff size=1>
AddColumn(<FONT color=#0000ff
size=1>StochK(<FONT color=#ff00ff
size=1>14),"Sell
price"format=<FONT color=#ff00ff
size=1>1.2<FONT
size=1>,textcolor=colorDefault,bkgndcolor=colorDefault);<FONT
color=#0000ff size=1>
AddColumn(<FONT color=#0000ff
size=1>StochK(<FONT color=#ff00ff
size=1>14),"Price
rise"format=<FONT color=#ff00ff
size=1>1.2<FONT
size=1>,textcolor=colorDefault,bkgndcolor=colorDefault);<FONT
color=#0000ff size=1>
AddColumn(<FONT color=#0000ff
size=1>StochK(<FONT color=#ff00ff
size=1>14),"%
change"format=<FONT color=#ff00ff
size=1>1.2<FONT
size=1>,textcolor=colorDefault,bkgndcolor=colorDefault);
Yahoo! Groups Sponsor
ADVERTISEMENT
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|