Register FAQ Calendar Search Today's Posts Mark Forums Read

#1
15th October 2016, 11:13 PM
 Member Join Date: Oct 2016 Posts: 4 Thanks: 0 Thanked 0 Times in 0 Posts

i required help on afl coading for exitprice that is if i exit my position in multiple condition then in backtest report it showing close price of that candel.but i required exact price of what my condition. for example if my condition is cross(prevdayc,l) or (h < prevdayc) or (c < ma(period,c) ; position will exit when low crossing prevdayc actual exit price is prevdayc and like this other cond also.but backtest report will show close of the candel .how to correct this .
 Sorry your browser does not support IFRAME

Looking for a share broker?

#2
3rd November 2016, 12:22 PM
 Member Join Date: Oct 2016 Posts: 48 Thanks: 10 Thanked 17 Times in 12 Posts
Linsupertrend and PSA (Price Speed Acceleration)

Quote:
 Originally Posted by vishp127 I would like to know MS Excel formula for below mentioned indicators: Linsupertrend Factor=param("Factor",3,1,3,1); Pd=Param("ATR Periods",10,1,100,1); Up = LinearReg((H+L)*0.5,Pd) + Factor*ATR(Pd); Dn = LinearReg((H+L)*0.5,Pd) - Factor*ATR(Pd); iATR=ATR(Pd); PSA (Price Speed Acceleration) //---- indicator buffers extern int period = 240; extern bool show_speed = TRUE; int limit; double speed[]; double acceleration[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators IndicatorBuffers(2); //---- drawing settings if (show_speed == TRUE){ SetIndexStyle(0,DRAW_HISTOGRAM); }else{ SetIndexStyle(0,DRAW_NONE); } SetIndexBuffer(0,speed); SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1,acceleration); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); int i; //---- if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; for(i=0; i
I need help with above..
#3
3rd November 2016, 04:50 PM
 Member Join Date: Mar 2013 Location: hyderabad Posts: 3,656 Thanks: 15,668 Thanked 7,802 Times in 2,922 Posts
Re: Amibroker formula coading help required

Quote:
 Originally Posted by balakumaran Dear traders , i required help on afl coading for exitprice that is if i exit my position in multiple condition then in backtest report it showing close price of that candel.but i required exact price of what my condition. for example if my condition is cross(prevdayc,l) or (h < prevdayc) or (c < ma(period,c) ; position will exit when low crossing prevdayc actual exit price is prevdayc and like this other cond also.but backtest report will show close of the candel .how to correct this .
This happens because in ur formula u did not mention sellprice/coverprice.
U just mentioned sell/cover.
The exit will happen according to ur condition but since sellprice is missing, it ll take close of the candle as exit price.
#4
14th November 2016, 12:49 PM
 Member Join Date: Oct 2016 Posts: 48 Thanks: 10 Thanked 17 Times in 12 Posts
Re: Amibroker formula coading help required

Quote:
 Originally Posted by balakumaran Dear traders , i required help on afl coading for exitprice that is if i exit my position in multiple condition then in backtest report it showing close price of that candel.but i required exact price of what my condition. for example if my condition is cross(prevdayc,l) or (h < prevdayc) or (c < ma(period,c) ; position will exit when low crossing prevdayc actual exit price is prevdayc and like this other cond also.but backtest report will show close of the candel .how to correct this .
http://www.marketcalls.in/afl-code/s...ploration.html
#5
27th November 2016, 04:18 AM
 Member Join Date: Oct 2016 Posts: 48 Thanks: 10 Thanked 17 Times in 12 Posts
Amibroker afl coding help required

Whenever I press Explore button, I want this afl to display only 1 symbol in Automatic Analysis window out of watchlist. Something is missing there, please help me..

wlnum = GetOption( "FilterIncludeWatchlist" );
List = CategoryGetSymbols( categoryWatchlist, wlnum ) ;

if ( Status("stocknum") == 0 )
{
StaticVarRemove( "rank*" );

for ( n = 0; ( Symbol = StrExtract( List, n ) ) != ""; n++ )
{
SetForeign ( symbol );
values = Roc( Close, 10 );
RestorePriceArrays();
StaticVarSet ( "valuesToSort" + symbol, values );
}

StaticVarGenerateRanks( "bot", "valuesToSort", -1, 1234 );
}

symbol = Name();

rank = StaticVarGet ( "rank" + "values" + symbol );

Filter = rank <= 1;

Last edited by vishp127; 27th November 2016 at 04:29 PM.
#6
27th November 2016, 06:51 PM
 Member Join Date: Oct 2016 Posts: 4 Thanks: 0 Thanked 0 Times in 0 Posts
Re: Amibroker formula coading help required

thanks ..... to all for your replies and help and i solved my problem by using iff condition . buy price = iff( )...iff ( ) like that.
#7
28th November 2016, 06:35 PM
 Member Join Date: Aug 2006 Posts: 22 Thanks: 0 Thanked 0 Times in 0 Posts
Re: Amibroker formula coading help required

dear sir, how is amibroker software? how is its scanning and exploration facilities? I am seriously thinking to buy amibroker software and e signal data.

regards. buran,
#8
20th December 2016, 08:23 PM
 Member Join Date: Sep 2011 Posts: 18 Thanks: 1 Thanked 3 Times in 2 Posts
Re: Amibroker formula coading help required

Amibroker is really good, I have used multiple charting softwares but the kind of flexibility and power you can get in Amibroker is Unique. It is also super fast and easy to code with tons of examples all around.

I have licenses Amibroker v 6.10 and I will certainly recommend Buying it as it is worth it. In terms of Data you dont need e-signal, there are many cheaper options available that provide tick data at around 500 Rs per segment per month. That works well with Amiboker.

Ganesh
 The Following 2 Users Say Thank You to pawarganesh For This Useful Post: TracerBullet (20th December 2016), vijkris (23rd December 2016)

 Bookmarks

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are Off Pingbacks are Off Refbacks are Off Forum Rules

 Similar Threads for: Amibroker formula coading help required Thread Thread Starter Forum Replies Last Post ehtsm Fundamental Analysis 9 3rd September 2015 01:05 PM rbhapkar AmiBroker 1 1st September 2011 09:34 PM pkgmtnl MetaStock 3 1st March 2009 10:49 PM pra MetaStock 2 12th January 2009 03:01 PM purvija99 MetaStock 2 22nd August 2008 11:43 AM

All times are GMT +5.5. The time now is 12:33 PM.

Indemnity, Disclaimer & Disclosure Notice:
* By visiting Traderji.com you automatically indicate that you agree to our Forum Rules, Indemnity, Disclaimer & Disclosure Notice and General Content Disclaimer Notice and indemnify Traderji.com, its associates and related parties of all claims howsoever resulting from the usage of the forum/site.