PureBytes Links
Trading Reference Links
|
Are
you simply double clicking the trade to plot the arrows or have you right
clicked then chosen "Show actual trades"??
<FONT face=Arial color=#0000ff
size=2>
Try
this... create a new indicator with this code.....
<FONT face=Arial color=#0000ff
size=2>
x = <FONT
color=#0000ff>Cross(<FONT
size=2>RSI(),<FONT
size=2>30<FONT face=Arial
color=#0000ff>);
Plot(<FONT face=Arial
color=#0000ff size=2>RSI<FONT face=Arial color=#282828
size=2>(),""<FONT face=Arial
color=#282828 size=2>,5<FONT
face=Arial color=#282828 size=2>,<FONT face=Arial color=#ff00ff
size=2>1);<FONT
face=Arial color=#0000ff size=2>
PlotGrid(<FONT
face=Arial color=#ff00ff size=2>30<FONT face=Arial color=#282828
size=2>,colorWhite<FONT face=Arial
color=#282828 size=2>);
Plot<FONT color=#282828
size=2>(x,""<FONT color=#282828
size=2>,4<FONT color=#282828
size=2>,2<FONT color=#282828
size=2>|styleOwnScale<FONT
color=#282828 size=2>);
<FONT face=Arial
size=2>The red lines will show the actual cross. Now run this simple system
test...
<FONT face=Arial
size=2>
<FONT
color=#0000ff>
SetTradeDelays<FONT
face=Arial>(3<FONT
color=#282828>,0<FONT
color=#282828>,0<FONT
color=#282828>,0<FONT
color=#282828>);
Buy<FONT
color=#0000ff>= Cross<FONT
size=2>(RSI(),<FONT
size=2>30<FONT
color=#0000ff>);
Sell<FONT
color=#0000ff>=Cross<FONT
size=2>(30,<FONT
size=2>RSI<FONT face=Arial
color=#0000ff>());
<FONT face=Arial
color=#0000ff>
<FONT face=Arial
color=#0000ff size=2>Test over enough days to be sure you get a signal. Next rt
click a trade and choose "Show actual trade". I believe you will see the arrow
to be 3 days after the red line cross..
<FONT
color=#0000ff>
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>
Regards,
Jayson
<FONT face=Tahoma
size=2>-----Original Message-----From: ed2000nl
[mailto:pablito@xxxxxxx]Sent: Monday, September 29, 2003 2:29
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re:
help with trading systemhi Jayson,I started
with such a simple system in order to be able to track what is going
on.1) I start with SetTradeDelays(0,0,0,0);Buy =
Cross(RSI(),30); then I look in the chart (standard Price chart)
where the buy signals are.2) now I make a change:
SetTradeDelays(1,0,0,0);Buy = Cross(RSI(),30);and again I
look where the buy signals are: nothing changed?I think I am missing
something ...Indeed "Buy = Ref(Buy, -1);" is not the proper thing to
use for my purposes although it seems to move the moment of purchase 1 day
forward.Seems I am lost here. If I make a change from
SetTradeDelays(0,0,0,0); to SetTradeDelays(1,0,0,0); and no difference can
be seen things get complicated.Maybe you can point me to a similar
example somewhere in the archive which does similar things as my example. I
am not really interested in systems like: Buy = Cross(RSI(),30);Sell
= Cross(70,RSI());I want to closely monitor a buy signal and then find an
exit point like in my example.thanks,rgds, Ed
--- In amibroker@xxxxxxxxxxxxxxx, "Jayson"
<jcasavant@xxxx> wrote:> Ed,>
if Buy = Cross(RSI(),30);> then
ref(buy,-1) would be the previous time that that RSI and 30
crossed.> Is that what you want? Since you have replaced buy with
ref(buy,-1) you are> testing a buy that you could not have possibly
made..... Perhaps you want> Buy = Cross(RSI(),30); but also want to
set trade delay=1 to implement the> buy on the next day?>
> Regards,> Jayson> -----Original Message----->
From: ed2000nl [mailto:pablito@xxxx]> Sent: Monday, September 29, 2003
12:31 PM> To: amibroker@xxxxxxxxxxxxxxx> Subject: [amibroker] Re:
help with trading system> > > Jayson,> > yes
I have.> > if I run the foolowing code:> > //
overide default settings> SetTradeDelays(0,0,0,0);> > //
make a simple trading system> Buy = Cross(RSI(),30);> > //
buy the next day at the open> // use Ref(Buy -1) because the Ref function
returns a value> // so the "1" numbers inside the Buy array are moved
forward this way.> Buy = Ref(Buy, -1);> > // define the
BuyPrice> BuyPrice = ValueWhen( Buy, Open);> > SellCond1 =
C > BuyPrice * 1.02;> SellCond2 = C < BuyPrice * 0.96;>
SellCond3 = Cross( BarsSince(Buy), 5 );> > Sell = SellCond1 OR
SellCond2 OR SellCond3;> > SellPrice = (SellCond1 * C);>
SellPrice = SellPrice + (SellCond2 * C);> SellPrice = SellPrice +
(SellCond3 * C);> > Buy = ExRem(Buy,Sell);> Sell =
ExRem(Sell,Buy);> > > for the stock CHKP I get as result in
the backtester (last 2 trades):> >
CHKP Long
7/3/2002 12.0800
7/5/2002 14.2600>
18.0%>
2029.25 18.0%
930.847 11244.6
3273.88 2> 9.02%>
CHKP Out
7/5/2002 14.2600
10/4/2002> 13.4600
-5.6%>
0.00 0.0%
0 0
3273.88 64
0.00%> CHKP
Long 10/4/2002
13.4600 10/10/2002
13.9900> 3.9%>
522.67 3.9%
986.172 13273.9
3796.55 5> 0.79%>
CHKP Out
10/10/2002 13.9900
9/26/2003 16.6500>
19.0%>
0.00 0.0%
0 0
3796.55 242
0.00%> > > the trade started at 7/3/2002 should be sold the
same day at the> close. I must have made some error somewhere, maybe in
the code?> > thanks,> > Ed> > --- In
amibroker@xxxxxxxxxxxxxxx, "Jayson" <jcasavant@xxxx> wrote:> >
Ed,> > Do you have "Allow same bar exit" checked?> >>
> Regards,> > Jayson> > >
> Yahoo! Groups
Sponsor>
ADVERTISEMENT> > > > > Send BUG REPORTS to
bugs@xxxx> Send SUGGESTIONS to suggest@xxxx>
-----------------------------------------> Post AmiQuote-related messages
ONLY to: amiquote@xxxxxxxxxxxxxxx> (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)>
--------------------------------------------> Check group FAQ at:>
<A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.Send
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
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.
|