PureBytes Links
Trading Reference Links
|
That won't work either. StyleOwnScale makes the plot "scale" to the full
window height for the viewable data based on it's own min/max values.
So, using StyleOwnScale on both will have no effect since the first plot
(without StyleOwnScale) does the same thing. What you need is to NOT use
StyleOwnScale. The problem is they are probably not in the same ballpark
of data values and the plots will never overlay, actually I mean they
will never "cross".
May I suggest you invent something to detect a divergence in the two
(which seems to be what you want). You could use LinRegSlope to do this
possibly coupled with an MA or EMA of the two slopes. You could also
subtract the price from the FVE and create and oscillator that you could
trade.
--
Terry
| -----Original Message-----
| From: amibroker@xxxxxxxxxxxxxxx
| [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Dickie Paria
| Sent: Wednesday, June 22, 2005 12:53
| To: amibroker@xxxxxxxxxxxxxxx
| Subject: [amibroker] Re: Need help with writing a one line
| code for a scan
|
|
| Hi Terry - good point ! I'll 'StyleOwnScale' on price and see what
| happens........now if I get a moment's break from work.....
|
| --- In amibroker@xxxxxxxxxxxxxxx, "Terry" <MagicTH@xxxx> wrote:
| > It's possible your scales don't match so, although it looks one way
| on
| > the graph, it is actually different in values. In reviewing you
| code I
| > see Price is plotted normally while your Volume uses styleOwnScale
| as
| > does the plot of FVE.
| > --
| > Terry
| >
| >
| > | -----Original Message-----
| > | From: amibroker@xxxxxxxxxxxxxxx
| > | [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Dickie Paria
| > | Sent: Wednesday, June 22, 2005 11:30
| > | To: amibroker@xxxxxxxxxxxxxxx
| > | Subject: [amibroker] Re: Need help with writing a one line
| > | code for a scan
| > |
| > |
| > | Hi Steve - I do mean crosses it. I had already tried
| the 'Buy/Sell'
| > | code you wrote. Doesn't work. If I use that 'Buy/Sell' code and
| do
| > | a scan over stock prices - I get numerous 'Buy' signals but on
| the
| > | price chart the green 'Buy' arrow is not necessarily near the
| actual
| > | cross. For e.g - AIRN shows a 'Buy' signal for yesterday's close
| but
| > | the price chart shows the FVE money flow crossing the AIRN price
| from
| > | below sometime in mid-March. Dickie
| > |
| > | --- In amibroker@xxxxxxxxxxxxxxx, "Steve Dugas" <sjdugas@xxxx>
| wrote:
| > | > Hi Dickie,
| > | >
| > | > If by "cuts the price line", you mean crosses it, then you can
| just
| > | use the
| > | > built-in cross function, something like:
| > | >
| > | > buy = cross( fve, close );
| > | > sell = cross( close, fve );
| > | >
| > | > If you meant something else, sorry for the misunderstanding.
| > | >
| > | > Steve
| > | >
| > | > ----- Original Message -----
| > | > From: "Dickie Paria" <babui@xxxx>
| > | > To: <amibroker@xxxxxxxxxxxxxxx>
| > | > Sent: Wednesday, June 22, 2005 10:53 AM
| > | > Subject: [amibroker] Need help with writing a one line code for
| a
| > | scan
| > | >
| > | >
| > | > > Below is the afl code for overlaying a money flow indicator
| onto
| > | the
| > | > > price chart. Normally - the money flow and the prices move
| in
| > | > > unison. Once in a while - there is a divergence and the money
| > | flow
| > | > > goes in one direction and the price in another. Looks very
| > | dramatic
| > | > > on the chart.
| > | > > Qts - how can I write a line of code that allows me to scan
| for
| > | > > stocks where the money flow indicator (FVE in the code) cuts
| the
| > | > > price line on the price chart?
| > | > >
| > | > > ********************************************************
| > | > > Col = IIf(Close>Ref(Close,-1), colorGreen,colorRed);
| > | > > Plot(Close,"Price", Col, styleBar);
| > | > >
| > | > > Col=IIf(Close>Ref(Close,-1),colorGreen,colorRed);
| > | > > Plot(Close,"PRICE",COL,styleBar);
| > | > >
| > | > > _SECTION_BEGIN("Volume");
| > | > > Plot( Volume, _DEFAULT_NAME(), ParamColor("Color",
| > | colorBlueGrey ),
| > | > > ParamStyle( "Style", styleHistogram | styleOwnScale |
| styleThick,
| > | > > maskHistogram ), 2 ); _SECTION_END();
| > | > >
| > | > > Col=IIf(Close>Ref(Close,-1),colorGreen,colorRed);
| > | > > Plot(Close,"PRICE",COL,styleBar);
| > | > >
| > | > > _SECTION_BEGIN("Price");
| > | > > SetChartOptions(0,chartShowArrows|chartShowDates);
| > | > > _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %
| g,
| > | Hi %
| > | > > g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +"
| > | {{VALUES}}",
| > | > > O, H, L, C, SelectedValue( ROC( C, 1 )) ));
| > | > > Plot( C, "Close", ParamColor("Color", colorBlack ),
| styleNoTitle |
| > | > > ParamStyle("Style") | GetPriceStyle() ); _SECTION_END();
| > | > >
| > | > > _SECTION_BEGIN("FVE");
| > | > > Period = 22;
| > | > >
| > | > > // users of v4.25 or higher can use Param to adjust
| > | period in real
| > | > > time // Period = Param("FVE period", 22, 10, 80, 1 );
| > | > >
| > | > > MF = C - (H+L)/2 + Avg - Ref( Avg, -1 );
| > | > >
| > | > > Vc = IIf( MF > 0.003 * C, V,
| > | > > IIf( MF < -0.003 * C, -V, 0 ) );
| > | > >
| > | > > FVE = Sum( Vc, Period )/MA( V, Period )/Period * 100;
| > | > >
| > | > > Plot( FVE, "FVE", colorRed, styleOwnScale );
| > | > >
| > | > > _SECTION_END();
| > | > >
| > | > >
| > | > >
| > | > >
| > | > > Please note that this group is for discussion between users
| only.
| > | > >
| > | > > To get support from AmiBroker please send an e-mail directly
| to
| > | > > SUPPORT {at} amibroker.com
| > | > >
| > | > > For other support material please check also:
| > | > > http://www.amibroker.com/support.html
| > | > >
| > | > >
| > | > > Yahoo! Groups Links
| > | > >
| > | > >
| > | > >
| > | > >
| > | > >
| > | > >
| > | > >
| > |
| > |
| > |
| > |
| > | Please note that this group is for discussion between users only.
| > |
| > | To get support from AmiBroker please send an e-mail directly to
| > | SUPPORT {at} amibroker.com
| > |
| > | For other support material please check also:
| > | http://www.amibroker.com/support.html
| > |
| > |
| > | Yahoo! Groups Links
| > |
| > |
| > |
| > |
| > |
| > |
| > |
|
|
|
|
| Please note that this group is for discussion between users only.
|
| To get support from AmiBroker please send an e-mail directly to
| SUPPORT {at} amibroker.com
|
| For other support material please check also:
| http://www.amibroker.com/support.html
|
|
| Yahoo! Groups Links
|
|
|
|
|
|
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.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/
|