PureBytes Links
Trading Reference Links
|
ok, got bored and wrote this:
stk=StochK(<FONT
color=#ff00ff size=1>14);
std=StochD(<FONT
color=#ff00ff size=1>14);
top=Ref(<FONT
color=#0000ff size=1>HHV(H,<FONT color=#ff00ff
size=1>3),-1<FONT
size=1>);
bottom=Ref<FONT
face="Courier New" size=1>(<FONT face="Courier New" color=#0000ff
size=1>LLV(<FONT
face="Courier New" size=1>L<FONT face="Courier New"
size=1>,3<FONT
face="Courier New" size=1>),-<FONT face="Courier New" color=#ff00ff
size=1>1);<FONT
size=1>
Plot(C,<FONT color=#0000ff
size=1>Name<FONT
size=1>(),colorWhite,styleCandle);<FONT color=#0000ff
size=1>
Plot(top,<FONT color=#ff00ff
size=1>"top"<FONT
size=1>,colorTan,styleDots);
Plot(stk,"stoch
k"<FONT
size=1>,colorRed,styleLine+styleOwnScale);<FONT
color=#0000ff size=1>
Plot(std,"stoch
d"<FONT
size=1>,colorAqua,styleLine+styleOwnScale);
Cond1buy=Cross<FONT
size=1>(stk<FONT
size=1>,std);
Cond2buy=H>top;
Cond1sell=<FONT
face="Courier New" color=#0000ff size=1>C<FONT face="Courier New"
color=#0000ff size=1>ross<FONT face="Courier New"
size=1>(std,stk);
C<FONT face="Courier New"
size=1>ond2sell=L<bottom;
Cover=Buy=Cond1buy AND Cond2buy;<FONT
face="Courier New" size=1>
BuyPrice=t<FONT
face="Courier New" size=1>op;
Short=Sell=C<FONT
face="Courier New" size=1>ond1sell AND <FONT face="Courier New"
size=1>Cond2sell;
SellPrice=bottom;<FONT color=#800000
size=1>
#pragma nocache;<FONT color=#800000
size=1>
#include
<plot_arrows.afl>;
Check if it is what you need.
Plot_arrows.afl looks like this:
<FONT face=Arial
size=2>PlotShapes(Buy*shapeUpTriangle,colorBrightGreen,0,Low,-20);PlotShapes(Sell*shapeHollowCircle,colorRed,0,SellPrice,0);PlotShapes(Short*shapeDownTriangle,colorRed,0,High,-20);PlotShapes(Cover*shapeHollowSquare,colorBrightGreen,0,CoverPrice,0);
days = Param( "Days to test", 130, 1, 5000, 1
);sys=Equity(1,2,days);Plot(sys,"equity",colorLightBlue,styleArea+styleOwnScale);
gty
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
Rakesh
Sahgal
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Saturday, May 15, 2004 5:58
PM
Subject: Re: [amibroker] My Plot Arrow
Problem
Gary
The way I have structured my formula is:
1. Look for condition 1 and mark the high of the day condition1 occurs as
trigger level..
2. If trigger level is crossed, only then am I triggered into the
trade - I am using the cross function to determine the crossover.
Once the crossover happens the relevance of such a trigger is nil as an
entry point. Problem is the formula is still remembering that trigger
level. It forgets it alright when the next buy signal is given by the
indicator and accepts the new trigger level. But if prior to a new buy signal
the price gyrates around the earlier trigger level an arrow is plotted.
Some loud thinking - Is it possible to write a condition that says only
the n=1 occurence of the crossover of the trigger level by the price is to be
used? I also tried using valuewhen and couldnt make it work. If this is
possible what function is to be used?
Rakesh
"Gary A. Serkhoshian"
<serkhoshian777@xxxxxxxxx> wrote:
<BLOCKQUOTE class=replbq
>Rakesh,Make
sure you AND your conditions to create your Buy,and that you are using
the Buy to create the arrow.Buy = Condition1 and Condition2;Sell
= SellCondition1 and SellCondition2;Buy = Exrem(Buy, Sell);Sell
= Exrem(Sell, Buy);PlotShapes(Buy * shapeUpArrow, colorgreen, 0,
L);--- Rakesh Sahgal <rakeshsahgal@xxxxxxxxx>
wrote:> I have a formula that says:> > 1. Go long
when long StochK crosses StochD and vice> versa for
short.> > 2. Trigger to be crossed for executing the
trade is> close higher than the high of the crossover day and>
once again vice versa for short.> > Once a long signal
is given both in terms of> indicator and price crossover, the value
of the high> of the crossover bar is irrelevant.>
> Now the problem:> > However what is happening
is:> > 1. Buy Trade arrow is displayed - Correctly
.> 2. Sell Trade arrow is displayed - Correctly.>
> this is where the foul up is happening:> > 3.
When the price again crosses the level determined> in 1 an arrow is
plotted even though it has no> relevance/significance.>
> I experimented with EXREM, but to no avail. Can> someone
kindly point out the error in my> logic/coding which is causing this
wrong display of> arrows to occur? > >
TIA> > > Rakesh> >
>
> ---------------------------------> Do you Yahoo!?>
SBC Yahoo! - Internet access at a great low
price.
__________________________________Do you Yahoo!?SBC Yahoo! -
Internet access at a great low price.<A
href="">http://promo.yahoo.com/sbc/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
Do you Yahoo!?<A
href="">SBC
Yahoo! - Internet access at a great low price. 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
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 the Yahoo! Terms of Service.
|