Thanks Anthony

What I would like to do is put some simple buy and sell signals in there as well

ie.
- When it gaps up on open and then heads back down closes into the previous 
days range, I would like to short the stock on the next trading day at open and 
cover at close (assuming its a down day, no stops required)
- I would like to do the opposite gaps down on open. To buy at open on next 
trading day, and sell at close

If you have time to help me out with this , that would be great, if not, i 
appreciate the help you've given me so far

ALSO, how can become as proficient as you at this stuff, will howard bandy's 
book on 'Intro to AB' help me out? Any advice would be grand

Cheers 





________________________________
From: Anthony Faragasso <[email protected]>
To: [email protected]
Sent: Fri, 25 December, 2009 12:46:30 PM
Subject: Re: [amibroker] Re: Code for AFL on a reversal day. Help required

  

gapclosingfromupope n =Open > Ref(H,-1) AND C > Ref(L,-1) AND C < Ref(H,-1);
gapclosingfromdowno pen=Open < Ref(L,-1) AND C > Ref(L,-1) AND C < Ref(H,-1);
Color= IIf(gapclosingfromupop en,colorRed,IIf(gapclosingfromdown 
open,colorBlue,ParamColor("color",colorBlack)));
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} 
{{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, 
SelectedValue( ROC( C, 1 ) 
) ));
Plot( C, "Close", color , styleNoTitle | ParamStyle("Style") | GetPriceStyle() 
); 
_SECTION_END();
 
Filter= gapclosingfromupope n OR gapclosingfromdowno pen;
AddColumn(C,"");
AddColumn(gapclosingfromupop en,"up");
AddColumn(gapclosingfromdown Open,"down");
----- Original Message ----- 
>From: Joseph Occhipinti 
>To: amibro...@yahoogrou ps.com 
>Sent: Thursday, December 24, 2009 8:34 
>  PM
>Subject: Re: [amibroker] Re: Code for AFL 
>  on a reversal day. Help required
>
>  
>hi Anthony and other helpers
>
>
>thanks heaps for your help so far 
>
>
>the formula worked when i connected all the spaces
>
>
>is there anyway to highlight those days? Even if they dont reverse the 
>  trend, just all the days in question
>
>
>thanks
>
>
>
________________________________
 From: Anthony Faragasso <ajf1...@epix. net>
>To: amibro...@yahoogrou ps.com
>Sent: Fri, 25 December, 2009 10:41:30 
>  AM
>Subject: Re: [amibroker] 
>  Re: Code for AFL on a reversal day. Help 
>  required
>
>  
> 
>Joseph,
> 
>I just did what you described ....I opened the 
>  price formula using edit formula..... I copy and pasted the formula from 
>  the email into
>the price formula...and then clicked 
>  apply....
> 
>I GOT THE SAME ERROR MESSAGES AS 
>  YOU...    
> 
>The problem is WORD 
>  WRAP....     check the formula that you added...there will 
>  be spaces
>throughout the formula...you have to remove the 
>  spaces...
> 
>Look at the email you sent me in response.... 
>  LOOK AT THE SPACES  throughout the formula you added at the 
>  bottom..
>----- Original Message ----- 
>>From: Joseph Occhipinti 
>>To: amibro...@yahoogrou ps.com 
>>Sent: Thursday, December 24, 2009 6:29 
>>    PM
>>Subject: Re: [amibroker] Re: Code for 
>>    AFL on a reversal day. Help required
>>
>>  
>>thanks for jumping in anthony 
>>
>>
>>but i am still getting same error on all, some say error 31 (as well as 
>>    error 30)
>>
>>
>>i am right clicking mouse then going to 'edit formula', then adding 
>>    your formula to the existing price formula so that i end up with this:
>>
>>
>>_SECTION_BEGIN( "Price");
>>SetChartOptions( 0,chartShowArrow s|chartShowDates );
>>_N(Title = StrFormat("{ {NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, 
>>    Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 
>> 1 ) 
>>    ) ));
>>Plot( C, "Close", ParamColor(" Color", colorBlack ), styleNoTitle | 
>>    ParamStyle(" Style") | GetPriceStyle( ) ); 
>>_SECTION_END( );
>>
>>
>>gapclosingfromupope n=Open > Ref(H,-1) AND C > Ref(L,-1) AND C 
>>    < Ref(H,-1);
>>
>>
>>gapclosingfromdowno pen=Open < Ref(L,-1) AND C > Ref(L,-1) AND C 
>>    < Ref(H,-1);
>>
>>
>>Filter= gapclosingfromupope n OR gapclosingfromdowno pen;
>>
>>
>>AddColumn(C, "");
>>
>>
>>AddColumn(gapclosin gfromupope n,"up");
>>
>>
>>AddColumn(gapclosin gfromdown Open,"down") ;
>>
>>
>>
________________________________
 From: Anthony Faragasso 
>>    <ajf1...@epix. net>
>>To: amibro...@yahoogrou 
>>    ps.com
>>Sent: Fri, 25 
>>    December, 2009 10:07:59 AM
>>Subject: Re: [amibroker] Re: Code for 
>>    AFL on a reversal day. Help required
>>
>>  
>> 
>>gapclosingfromupope n=Open > Ref(H,-1) AND C > Ref(L,-1) AND C < Ref(H,-1);
>>gapclosingfromdowno pen=Open < Ref(L,-1) AND C > Ref(L,-1) AND C < Ref(H,-1); 
>>Filter= gapclosingfromupope n OR gapclosingfromdowno 
>>    pen; 
>>AddColumn(C,""); 
>>AddColumn(gapclosingfromupope n,"up"); 
>>AddColumn(gapclosingfromdown open,"down");
>>----- Original Message ----- 
>>>From: Joseph Occhipinti 
>>>To: amibro...@yahoogrou ps.com 
>>>Sent: Thursday, December 24, 2009 
>>>      5:49 PM
>>>Subject: Re: [amibroker] Re: Code for 
>>>      AFL on a reversal day. Help required
>>>
>>>  
>>>hi peter
>>>
>>>
>>>unfortunately the same error message is coming up 
>>>
>>>
>>>GapClosedWithinRang e = Open 
>>>      != Ref(Close,-1) AND Close > Ref(Low,-1) AND Close < 
>>>      Ref(High,-1)
>>>
>>>
>>>sorry to be a 
>>>      pest
>>>
>>>
>>>
________________________________
 From: peter843 <yahoogroups@ snugmail. 
>>>      com>
>>>To: amibro...@yahoogrou 
>>>      ps.com
>>>Sent: Fri, 25 
>>>      December, 2009 9:18:07 AM
>>>Subject: [amibroker] Re: Code for AFL 
>>>      on a reversal day. Help required
>>>
>>>  
>>>I assume you are not referring to the code posted below but the one in 
>>>      the subsequent post. Here is the correct 
>>>      version.
>>>
>>>GapClosedWithinRang e = Open != Ref(Close,-1) AND Close 
>>>      > Ref(Low,-1) AND Close < Ref(High,-1) ;
>>>
>>>--- In amibro...@yahoogrou 
>>>      ps.com, Joseph Occhipinti <joseph_occhipinti@ ...> 
>>>      wrote:
>>>>
>>>> Woops, hit send before i could finish email
>>>> 
>>> 
>>>> if its means anything, it had syntax error (error 30), the whole 
>>>      line was highlighted and the cursor was placed at the very end of the 
>>>      line
>>>> 
>>>> 
>>>> 
>>>> ____________ _________ _________ 
>>>      __
>>>> From: Joseph Occhipinti <joseph_occhipinti@ ...>
>>>> 
>>>      To: amibro...@yahoogrou 
>>>      ps.com
>>>> Sent: Fri, 25 December, 2009 8:49:37 AM
>>>> 
>>>      Subject: Re: [amibroker] Re: Code for AFL on a reversal day. Help 
>>>      required
>>>> 
>>>> 
>>>> Peter, it has come up with a Syntax 
>>>      error 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> ____________ _________ 
>>>      _________ __
>>>> From: Joseph Occhipinti <joseph_occhipinti@ 
>>>      yahoo.com>
>>>> To: amibro...@yahoogrou ps.com
>>>> Sent: Fri, 25 
>>>      December, 2009 7:59:46 AM
>>>> Subject: Re: [amibroker] Re: Code for 
>>>      AFL on a reversal day. Help required
>>>> 
>>>> 
>>>> thanks for 
>>>      your help peter
>>>> 
>>>> 
>>>> 
>>>> ____________ _________ 
>>>      _________ __
>>>> From: Joseph Occhipinti <joseph_occhipinti@ 
>>>      yahoo.com>
>>>> To: amibro...@yahoogrou ps.com
>>>> Sent: Fri, 25 
>>>      December, 2009 7:53:20 AM
>>>> Subject: Re: [amibroker] Re: Code for 
>>>      AFL on a reversal day. Help required
>>>> 
>>>> 
>>>> thanks 
>>>      peter
>>>> 
>>>> my definition of a gap: 
>>>> Previous days 
>>>      range, opens $1, high $1..02, low $0.95, closes $0.94. 
>>>> Next day it 
>>>      opens 90c, closes 98c (back within the previous days range), 
>>>> 
>>> 
>>>> cheers
>>>> 
>>>> 
>>>> 
>>>> 
>>>> ____________ 
>>>      _________ _________ __
>>>> From: peter843 <yahoogroups@ snugmail. 
>>>      com>
>>>> To: amibro...@yahoogrou ps.com
>>>> Sent: Fri, 25 
>>>      December, 2009 3:24:27 AM
>>>> Subject: [amibroker] Re: Code for AFL on 
>>>      a reversal day. Help required
>>>> 
>>>> 
>>>> ClosedWithinRange 
>>>      = Close > Ref(Low,-1) and Close < Ref(High,-1) ;
>>>GapClosedWithinRang e = Open != Ref(Close,-1) AND Close > 
>>>      Ref(Low,-1) AND Close < Ref(High,-1) ;
>>>> 
>>>> What is your 
>>>      definition of a gap?
>>>> 
>>>> --- In amibro...@yahoogrou ps..com, 
>>>      "siciliantrader" <joseph_occhipinti@ ...> wrote:
>>>> 
>>>      >
>>>> > hi, i have another question to the AFL gurus who can 
>>>      help
>>>> > 
>>>> > Im having some real trouble trying to code 
>>>      for the following:
>>>> > 
>>>> > I want to identify / be able 
>>>      to scan for when a stock gaps down (or up), on open and then closes 
>>> back 
>>>      into the previous days range (as per the link
>>>> > 
>>>> > 
>>>      as per the following chart on the link below
>>>> > 
>>>> > 
>>>      can anyone at least point me in the right direction?
>>>> > 
>>>> 
>>>      > 
>>>> > any help would be awesome
>>>> > 
>>>> > http://f1.grp. >>>      yahoofs.com/ v1/YAMzS2xS1lym2 d3QIqSpFgLV6ggBl 
>>>> > XGZ7uD8HtpW3rcD1 
>>>      IfaXRS6AoFeC2- PBv4BP9rWGt- kgINT7shexZ3ukaS mMQ3kRc2dvNIBnQ/ 
>>> Signal%202. 
>>>      gif
>>>> >
>>>> 
>>>> 
>>>> ____________ _________ 
>>>      _________ __
>>>> See what's on at the movies in your area. Find out 
>>>      now. 
>>>> ____________ _________ _________ __
>>>> See what's on at 
>>>      the movies in your area. Find out now. 
>>>> ____________ _________ 
>>>      _________ __
>>>> See what's on at the movies in your area. Find out 
>>>      now. 
>>>> __._,_..___
>>>> Reply to sender | Reply to group 
>>>      Messages in this topic (7) 
>>>> Recent Activity: * New Members 48 * 
>>>      New Photos 2 * New Files 3 
>>>> Visit Your Group Start a New Topic 
>>> 
>>>> **** IMPORTANT PLEASE READ ****
>>>> This group is for the 
>>>      discussion between users only.
>>>> This is *NOT* technical support 
>>>      channel.
>>>> 
>>>> TO GET TECHNICAL SUPPORT send an e-mail directly 
>>>      to 
>>>> SUPPORT {at} amibroker..com
>>>> 
>>>> TO SUBMIT 
>>>      SUGGESTIONS please use FEEDBACK CENTER at
>>>> http://www.amibroke r.com/feedback/
>>>> (submissions 
>>>      sent via other channels won't be considered)
>>>> 
>>>> For NEW 
>>>      RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>>>> http://www.amibroke r.com/devlog/
>>>> 
>>>> 
>>> 
>>>> MARKETPLACE
>>>> Going Green: Your Yahoo! Groups resource for 
>>>      green living
>>>> 
>>>> ____________ _________ _________ __
>>>> 
>>> 
>>>> Going Green: Your Yahoo! Groups resource for green living
>>>> 
>>> 
>>>> Switch to: Text-Only, Daily Digest • Unsubscribe • Terms of 
>>>      Use
>>>> . 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> ____________ 
>>>      _________ _________ _________ _________ _________ _
>>>> See what's on 
>>>      at the movies in your area. Find out now: http://au.movies. yahoo.com/ 
>>>      session-times/
>>>>
>>>
>>>
>>>________________________________
 >>>      See what's on at the movies in your area. Find out now.. 
>>> 
>>________________________________
 >>    See what's on at the movies in your area. Find out now.. 
>> 
>________________________________
 >  See what's on at the movies in your area. Find out now.
> 
 


      
__________________________________________________________________________________
See what's on at the movies in your area. Find out now: 
http://au.movies..yahoo.com/session-times/

Reply via email to