PureBytes Links
Trading Reference Links
|
Dan,
feel free to ask question even if my answer is
often quick && short,
Thursday, I'll spend more time with my
computer.
but I think a code example is better than a lot of
text.
stephane
<BLOCKQUOTE dir=ltr
>
----- Original Message -----
<DIV
>From:
<A title=danielwardadams@xxxxxxxxx
href="">Daniel Adams
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Monday, April 26, 2004 8:16
PM
Subject: Re: [amibroker] Re: Question for
Stephane
Stephane,
Many thanks. I'll play with it and may have questions
later.
I hate to have to have other people solve my problems
but it sure is nice to know people like you are on this thread for
when you really get stuck.
<FONT
color=#0000ff>DanStephane Carrasset <<A
href="">s.carrasset@xxxxxxxxxxx>
wrote:
<BLOCKQUOTE class=replbq
>
--- In <A
href="">amibroker@xxxxxxxxxxxxxxx,
"danielwardadams" <<A
href="">danielwardadams@x...> wrote:>
Stephane,> A couple of weeks ago you sent me some code to trail a
stop after a > certain percent profit had been reached. I'm still
struggling trying > to backtest using EOD Buy signals but exiting
on intraday trailing > stops (after some profit %).> >
In all of your trailing stop code (I've looked at Rem.dll too), you >
have lot of "for (i=0; i< Barcount; i++)" statements. If my backtest
> periodicity is set to 1 minute (so presumably "i" is counting in
> minutes), how do I look at EOD data within (or prior to) your code?
> When changing periodocities, do you have to modify the value of
"i"? > My base interval is 1 minute data.
Hello,
if yours data are minutes bar, below is an example
to get buy signal based on EOD with a looping example
TimeFrameSet( inDaily );
Lchart= H<Ref<FONT
size=1>(H,-1)
AND L<Ref<FONT
size=1>(L,-1<FONT
size=1>);
Top[0<FONT
size=1>]=High[0<FONT
size=1>];
ValBO=0.5<FONT
size=1>;
for( i = <FONT color=#ff00ff
size=1>1 ; i < BarCount; i++ )
{
if
(Lchart[i])
Top[i]=(High[i]*(1<FONT
size=1> + valBO/100));
else
Top[i]=Top[i-1<FONT
size=1>];
}
Buy=<FONT face="Courier New" color=#0000ff
size=1>Cross<FONT face="Courier New"
size=1>(C,Top);
TimeFrameRestore();<FONT
face="Courier New" size=1>
Buy=<FONT color=#0000ff
size=1>TimeFrameExpand(<FONT
face="Courier New" size=1>Buy<FONT
face="Times New Roman">,inDaily);<FONT
face="Courier New" size=1>
Top=<FONT color=#0000ff
size=1>TimeFrameExpand(<FONT
face="Courier New" size=1>Top<FONT
face="Times New Roman">,inDaily);<FONT
color=#0000ff size=1>
Plot(<FONT face="Courier New"
size=1>Top,<FONT color=#ff00ff
size=1>"",<FONT color=#ff00ff
size=1>2,1<FONT
size=1>);
Plot(C,<FONT color=#ff00ff
size=1>"",<FONT color=#ff00ff
size=1>1,<FONT color=#ff00ff
size=1>64);
PlotShapes(<FONT color=#0000ff
size=1>IIf( Buy,
shapeUpArrow,shapeNone),colorGreen,<FONT
color=#ff00ff size=1>0,L,-<FONT
color=#ff00ff size=1>20);
Stephane
> If I understood this, maybe I'd have a breakthrough in my
> understanding of timeframes. I've read the timeframe tutorial
section > many times but still can't ever get things to
work.> > TIA,> DanSend 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
__________ NOD32 1.734 (20040424) Information
__________This message was checked by NOD32 antivirus system.<A
href="">http://www.nod32.com
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@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
__________
NOD32 1.736 (20040426) Information __________This message was checked
by NOD32 antivirus system.<A
href="">http://www.nod32.com
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.
|