PureBytes Links
Trading Reference Links
|
Hello Vivek,
If you want to short, you either have to add a new condition for shorting
and covering or just edit
Sell = scond1 OR scond2;
to
Sell = Short = scond1 OR scond2;
and
Buy = bcond1 AND bCond3 OR bCond2;
to
Cover = Buy = bcond1 AND bCond3 OR bCond2;
If you dont want to place a short option,
Add the following
Short=Cover=0;
Regards
Prashanth
----- Original Message -----
From: <vivek.kumar-bhat@xxxxxxxxxxxxxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, October 12, 2004 1:39 PM
Subject: [amibroker] missing short cover variable assignments
>
>
> HI all
>
> i was trying to backtest the EMA band fromula as attached below which i
had picked up from the library. how ever i am getting the error mesage as "
> missing short cover variable assignments " when i an trying for the short
side. can some one guide me as to where am i going wrong or what should i do
> to rectify the same
>
> thanx
>
> /* EMA offset bands ver 1_2
> I'd guess this is NOT much different to bbands except you can contol the
per % offset and the periods ema to off set*/
> per=.10;//Percent placement
> periods=20;//time periods
> /*********************************/
>
> emaverage= EMA(C,periods);
> bandsAdjust=emaverage*per;
>
> upperband=emaverage+bandsAdjust;
> Lowerband=emaverage-bandsAdjust;
> Plot(EMA(C,periods),"ema",5,1);
> Plot(C,"EMA",15,64);// plots the close with candles
> Plot(upperband,"upperband",3,1);// upperband
> Plot(Lowerband,"lowerband",4,1);//lowerband
>
> bCond1=Ref(Cross(C,Lowerband),-1) AND C > lowerband ;
> bCond2= C > EMAverage ;// the "or" gets me into up trends
> bCond3= C > EMA(C,65);// trend
>
> Buy = bcond1 AND bCond3 OR bCond2;
>
> scond1= Ref( Cross(emaverage,C),-1)AND C < emaverage;// close days under
ema
> scond2=C < Lowerband;//failed trade drops below lowerband
> Sell = scond1 OR scond2;
>
> Buy = ExRem( Buy, Sell );// removes buy/sell arrows
> Sell = ExRem( Sell, Buy );
>
> ----------
>
> ----------------------------------------- (on scbaprssxmrl)
>
> This email is confidential. If you are not the addressee tell the sender
immediately and destroy this email without using, sending or storing it.
Emails are not secure and may suffer errors, viruses, delay, interception
and amendment. Standard Chartered PLC and subsidiaries ("SCGroup") do not
accept liability for damage caused by this email and may monitor email
traffic. Unless expressly stated, any opinions are the sender's and are not
approved by SCGroup and this email is not an offer, solicitation,
recommendation or agreement of any kind.
>
>
>
> Standard Chartered Bank ("SCB") is a member of SCGroup incorporated in
England with limited liability. SCB's principal office is 1 Aldermanbury
Square, London, EC2V 7SB, UK. SCB is authorised and regulated by the
Financial Services Authority ("FSA") and in FSA's register under no. 114276.
SCB's VAT no. is GB244106593. FSA is the lead regulator for the SCGroup. For
regulators in other countries contact the local compliance officer.
>
> ---------------------------------------------------------
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
> Check AmiBroker web page at:
> http://www.amibroker.com/
>
> Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|