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

[amibroker] help needed in finding error in afl



PureBytes Links

Trading Reference Links

helow fellow traders,
 
i am trying to writ AFL code for intraday brekout sysem. i have written following code which does note return any trade in backtesting mode. what is wron with programming.
 
my system :
 
check for HHV/LLV up to first 17 bars(intraday 5 min bars). buy 1 tick above hhv value from 18 th bar to end of day. exit at end of day close. explosartion with filter unmarked ok.
 
asit.
 
 
TimeFrameSet(in5Minute);
Date_Value =
DateNum() ;
Time_Value =
TimeNum() ;
ps =
0 ;
Buy =
0;
Sell =
0;
Stop = Null;
StopArray = Null;
ExitLongPosition = time_value >
152500 ;
for( i = 1 ; i < BarCount ; i++ )
{
Date_Value =
DateNum() ;
ddh =
TimeFrameGetPrice( "H", inDaily );
ddl =
TimeFrameGetPrice( "l", inDaily );
H30m =
0 ;
L30m =
0 ;
if(Date_value[i] = Date_value[i-1] )
{
H30m =
HHV(H,19);
L30m =
LLV(L,19);
EntryLongSignal =
Cross(H,H30m);
}
if(EntryLongSignal[i])
{
Buy[i] =
1 ;
BuyPrice[i] = (H30m +
1 ) ;
for (j = i; j < BarCount; j++)
{
if (j > i)
Buy[j] =
0;
Sell[i] = exitlongposition[i];
SellPrice[i] = C[i] ;
}
}
/* for( j = 0 ; j < BarCount ; j++ )
{
Buy[j] = H[j] > (H30m[j]+1) AND time_value[j] > 113000 ;
BuyPrice[j] = (H30m[j]+1);
Sell[j] = time_value[j]> 152500 ;
SellPrice[j] = C[j] ;
}*/

}

//Filter = time_value > 112500 AND time_value < 113000 ;
AddColumn(Date_value,"datevalue",1);
AddColumn(time_value,"timevalue",1);
AddColumn(H30m,"highest high",1.2);
AddColumn(L30m,"lowest low",1.2);
AddColumn(ddh,"day's high",1.2);
AddColumn(ddl,"day's low",1.2);
//AddColumn(tr30m,"atr(30)",1.4);
 
 
 


Detailed profiles 4 marriage! Only at Shaadi.com Try it! __._,_.___

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___