PureBytes Links
Trading Reference Links
|
Hello,
Just about ready to give up on this., why is THIS profit exit so difficult to
achieve?
I've setup some code, note the following:
A. The OPEN price (next day following a Buy signal) is used to calculate
the % profit exit from.
B. When the CLOSE is above the % profit, EXIT the following day at the
OPEN.
c. The buy/sells on the chart are the initial signals.
The problem is that there are some days where the signals are the
wrong days and I can't figure out why ie: exits before the close is above
the profit exit (but not the LLV exit).
Any idea why pleeease?
//---------------------------8<-----------------------------------
Buy = Cross( MACD(), Signal() );
BuyPrice = Ref(Open,1);
Sell = Close<Ref(LLV(Low,11),-1);
SellPrice = Close;
SetTradeDelays(0,0,0,0);
ApplyStop(stopTypeProfit,stopModePercent,25,0,False,False);
Equity(1);
//PLOT
Binary=Ref(Flip(Buy,Sell),-1);
ColProf=IIf(Binary,55,256);
ColMaxL=IIf(Binary,32,256);
Plot(Close,"Close",colorBlack,128);
Plot(LLV(Low,11),"Trailing Stop",colorRed,1);
Plot(ValueWhen(Buy,Ref(Open*1.25,1)),"Profit",ColProf,4|2048|4096);
PlotShapes(IIf(Buy,shapeUpTriangle,shapeNone),5,0,L,-10);
PlotShapes(IIf(Sell,shapeDownTriangle,shapeNone),4,0,H,-10);
//---------------------------8<-----------------------------------
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
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/
|