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

[amibroker] what am I doing wrong??



PureBytes Links

Trading Reference Links

hi,
 
can't figure out what I am doing wrong. Below a simple example. I create an array using a function. This array I use to find Buy signals. I put the buy signals in a chart. All seems good. Then I do an explore and then I see that the explore puts the buy signals at a different date. There seems nothing strange about the code. What could be wrong?
 
Ed
 
 
function ffZig(vv,pp) {

   
// initialize fzg array

   fzg =
0
;

   
// perform loop to fill fzg array

   
for( i = 0; i < BarCount; i= i + 10
) {

      fzg[ i ] =
1
;
   }
   
   
return
fzg;
}


SetBarsRequired(10000,10000
);
ZZ = ffZig(
C,0
) ;

Buy = ZZ == 1
;
Short = 0
;

PlotShapes( shapeUpArrow*Buy, colorGreen
);
Plot(C, " ", colorBlue,  styleCandle
) ;

Filter = 1
;
AddColumn(Buy,"Buy"
);



Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links