AmiBroker formula Language

murthymsr

Well-Known Member
#1
hi senior users of Amibroker & its Formulae Language,

you might have developed some code for your use.
it would be nice if you share it with fellow-members and also provide links for the internet resources for the same.

thanks in advance.
murthymsr
 

murthymsr

Well-Known Member
#3

asnavale

Well-Known Member
#5
Hi satya, murthysir
can u help to import fullname andsectors/industry into AMI (available at NSE website in .csv format)
Hi Roshanna,

Please go to the amibroker news letter No. 4 and read about assigning industry groups etc. The link is http://www.amibroker.com/newsletter/04-2000.html
If you are not familiar with the programming read the first news letter.

-Anant
 

murthymsr

Well-Known Member
#6
Hi satya, murthysir
can u help to import fullname andsectors/industry into AMI (available at NSE website in .csv format)
dear roshanna,
sorry for the delayed response.

for assigning industries/sectors, now, you can follow the thread, just started:
http://www.traderji.com/amibroker/8686-amibroker-database-nse-stocks.html

the procedure is being introduced step-by-step so that the user may not have any problem. still querries if any may be posted.

all the best.
MurthyMSR
 

bvpraveen

Active Member
#7
Hi friends,

Here are some simple AFL's for the three types of stoploss - Initial, Breakeven and Trailing stoploss.

1. Initial stoploss

/****************************************************
Initial Stoploss - lowest "low" of the last n bars
*****************************************************/
lookbackPeriod = Param("Lookback period", 2, 2, 30);
Plot(LLV(L,lookbackPeriod), "Testing", ParamColor( "Long", colorGrey40));


2. Breakeven stoploss

/*******************************************************
Breakeven Stoploss - Open + brokerage% of open
********************************************************/
brokeragePercentage = Param("Brokerage Percentage", 1, 0.1, 5, 0.1);
Plot(O + O*(brokeragePercentage/100) , "Testing", ParamColor( "Long", colorYellow ));

3. Trailing stoploss

/****************************************************
Trailing Stoploss - a% below nth highest high
*****************************************************/
lookbackPeriod = Param("Lookback period", 10, 2, 30);
stoplossPercentage = Param("Stoploss Percentage", 5, 0.2, 10, 0.2);

Plot(HHV(H,lookbackPeriod) - HHV(H,lookbackPeriod) * (stoplossPercentage / 100), "Bullish SL", ParamColor( "Long", colorGrey40));
Plot(LLV(L,lookbackPeriod) + LLV(L,lookbackPeriod) * (stoplossPercentage / 100), "Bearish SL", ParamColor( "Short", colorGrey40));

I will post the AFL's as and when I come up with any new ones.
Thanks,
Praveen.
 

Niranjanam

Well-Known Member
#9
Hello Friends,

I am a newbe in TA as well as Amibroker.I know nothing about computer programming and AFL is greek to me.I will be very greatful if anybody can write an AFL scan for me.I swing trade pullbacks.

Scan EOD data for

Close > 50
Volume > 100000
Close < 10 SMA and Close > 30EMA
ADX (14) > 30 , Willims%R (3 day) < - 80
2 to 5 days continuous lower close from 3 month High

A Specimen chart attached

Thanks in advance
Regards
Niranjanam
 
Last edited:
#10
Hi Niranjanam,

An attempt from another newbie:) : -
Code:
_SECTION_BEGIN("SwingPullbacks");
function PercentR( periods ){
 return -100*( HHV(H, periods) - C) / (HHV(H, periods) - LLV(L, periods)); 
}
Buy = (  (C>50 AND V > 100000) 
	AND ( C < MA(C,10) AND C > EMA(C,30) )  
	AND ( ADX(14)>30 ) AND (PercentR(3) < -80) );
_SECTION_END();
I dont understand your last 2 conditions..
.. is that -80 ???
.. 2 to 5 days ???

Regards
Siva

Hello Friends,

I am a newbe in TA as well as Amibroker.I know nothing about computer programming and AFL is greek to me.I will be very greatful if anybody can write an AFL scan for me.I swing trade pullbacks.

Scan EOD data for

Close > 50
Volume > 100000
Close < 10 SMA and Close > 30EMA
ADX (14) > 30 , Willims%R (3 day) < - 80
2 to 5 days continuous lower close from 3 month High

A Specimen chart attached

Thanks in advance
Regards
Niranjanam
 
Last edited:

Similar threads