[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: I'm give up with Study ID code, Please help..



PureBytes Links

Trading Reference Links

It works if you get the syntax correct
If you want the results in a scan you need to replace the GetChartID()
with the actual number for that chart pane, and you get this from the
chart parameters window

Apply this to a new chart pane

if( status("Action")==1 ) Chart = GetChartID();
else Chart = 2628; // from parameter window for chart ChartID

buy = cross( close, study( "RE" , Chart ) );
sell = cross( study( "SU" , Chart ), close );

SetChartOptions( 0, chartShowDates|chartWrapTitle );
GraphXSpace=10;
_N(Title = "{{NAME}} - {{INTERVAL}} {{DATE}} "+_DEFAULT_NAME()+" :
{{OHLCX}} {{VALUES}}" );
Plot( C, "", ParamColor( "Price Colour", colorGrey50), ParamStyle(
"Price Style", styleBar, maskPrice ) );
PlotShapes( shapeUpArrow*Buy, colorGreen, 0, L, -12 );
PlotShapes( shapeDownArrow*Sell, colorRed, 0, H, -12 );

it will only provide results for the section of chart that contains
the drawn, named study. The study name can only apply to one line, so
each line will need its own unique studyID name
eg, say you have 10 lines and name them S0,S1,S3,...S9 then use

sell = 0;
for( n=0;n<=9;n++)
{
	sell = sell or cross( study( "S"+n , Chart ), close );
}

-- 
Cheers
Graham Kav
AFL Writing Service
http://www.aflwriting.com





2009/5/2 Maurice Petterlin <mozpet2001@xxxxxxxxx>:
> --- In amibroker@xxxxxxxxxxxxxxx, "Maurice Petterlin" <mozpet2001@xxx> wrote:
>>
>> --- In amibroker@xxxxxxxxxxxxxxx, "Mohammed" <softnews2003@> wrote:
>> >
>> > Hi all,
>> >
>> > I'm give up with this to code.
>> > I'm trying to use Study ID with my chart, I have plot a trend lien over
>> > the chart and assign RE for it , after that I do scan for the breakout
>> > but it is not give any result.
>> >
>> > Yes I have some of my trend lines broken and It should be showing in my
>> > scan.
>> >
>> > I'm using the following formula for my scan.
>> >
>> > Buy = Cross( Close, Study( "RE" ) );
>> >
>> > Please any one can help.
>> >
>> > Regards
>> >
>> I was just wondering if you had your question answered as I'm having the same problem. How do you scan for trendline breaks in Amibroker?
>>
> Unfortunately the example in the help file doesn't seem to work
> (taken from the help file)
> In this example we will detect if the closing price drops BELOW support trend line. This is actually very simple:
>
> sell = cross( study( "SU" ), close, GetChartID() );
>
> So does the code work??
>
>


------------------------------------

**** 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.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/