PureBytes Links
Trading Reference Links
|
OK I've just read the latest here:
http://www.amibroker.com/guide/afl/afl_view.php?name=EQUITY
...and I see I shouldn't place any delay's in the code. Maybe this is why I
am getting strange signals?
If this is the case how do I get the buyprice when I buy at the open of
tomorrow to calculate the profit/initial stop???
Cheers Glenn
--- In amibroker@xxxxxxxxxxxxxxx, "Glenn" <glennokb@xxxx> wrote:
> Hi,
>
> Anyone help please, why does the following code produce 3 signals on
> the last 3 days .
>
> If you run it through a scan to pick the latest trades and you will see
> what I mean ie: the 3 arrows.
>
> One signal is prior to the actual profit/initial stop.
> One signal on the actual profit/initial stop.
> One signal is following the actual profit/initial stop.
>
> Is there something obviously wrong here:
>
> Thanks, Glenn
>
> ---------------------8<--------------------
> GraphXSpace=10;
>
> N= Cross( EMA(Close,9) , EMA(Close,21) );
>
> Buy= N AND Ref(N,-1)==0;
> Sell= Close<Ref(LLV(Low,11),-1);
> buyprice = open;
> sellprice = open;
>
> ApplyStop( stopTypeProfit, stopModePercent, 25, False, False);
> ApplyStop( stopTypeLoss, stopModePercent, 20, False, False);
>
> PositionSize=5000;
>
> SetTradeDelays( 1, 1, 0 ,0);
>
> Equity(1);
>
> //Buy Signal plot
> PlotShapes(IIf(Buy,shapeHollowUpArrow ,shapeNone),5,0,L,-10);
>
> //Sell Signal plot
> PlotShapes(IIf(Sell,shapeHollowDownArrow ,shapeNone),4,0,H,-
> 10);
>
> //LLV Trailing Stop plot
> PlotShapes(IIf(Sell==1,shapeDigit1 ,shapeNone),9,0,H,50);
>
> //Initial Stop plot
> PlotShapes(IIf(Sell==2,shapeDigit2,shapeNone),4,0,H,50);
>
> //Profit Exit plot
> PlotShapes(IIf(Sell==3,shapeDigit3,shapeNone),5,0,H,50);
>
> Plot(Close,"Price",colorBlack,128);
> ---------------------8<--------------------
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Natural Vitamins for Good Prostate & Male Health. $28.97
http://www.challengerone.com/t/l.asp?cid=2865&lp=prosta2.html
http://us.click.yahoo.com/qJIe0D/89VGAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->
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 http://docs.yahoo.com/info/terms/
|