in short one normally only has a limited amount of intraday data from eSignal. 
If your calculation needs 250 bars of EOD data then it can't be done. However 
because Amibroker allows for mixed intraday/EOD data it should be possible. The 
code below shows that Amibroker does only display these data and not use them 
for calculations. If you display Daily data in mixed mode the chart will show 
buy and short triangles. Displaying hour or minute charts will not show any 
signals because it will not use the EOD data but the intraday data for the 
calculation. To generate the signals I need to use the EOD data for the 
calculation since I do not have sufficient intraday data .... Not possible?

rgds, Ed


// set timeframe 
TimeFrameSet( inDaily ); 

tt = NumDownBars = BarsSince( C >= Ref(C,-1)); 
ss = NumUpBars = BarsSince( C <= Ref(C,-1)); 

bc1 = tt >= 2 AND C > MA(C,250); 
Buy = bc1; 
Buy = Ref(Buy,-1); 

sc1 = ss >= 2 AND C < MA(C,250); 
Short = sc1; 
Short = Ref(Short,-1); 

// restore to current time frame 
TimeFrameRestore(); 

// expand arrays 
Buy = TimeFrameExpand( Buy, inDaily ); 
BuyPrice = IIf( Buy,Ref(C,-1),0); 
Short = TimeFrameExpand( Short, inDaily ); 
ShortPrice = IIf(Short,Ref(C,-1),0); 

GraphXSpace = 5; 
SetChartOptions(0, chartShowDates); 
Plot(C,"C",1,64); 
Title=Name()+ ", O: "+WriteVal(O)+ ", H: "+WriteVal(H)+ ", L: "+WriteVal(L)+ ", 
C: "+WriteVal(C); 

PlotShapes(IIf(Buy,shapeUpTriangle,0),colorWhite, layer = 0, yposition = 
BuyPrice, offset = 0 ); 
PlotShapes(IIf(Short,shapeDownTriangle,0),colorLightBlue, layer = 0, yposition 
= ShortPrice, offset = 0 ) 




  ----- Original Message ----- 
  From: Edward Pottasch 
  To: [email protected] 
  Sent: Monday, May 21, 2007 12:01 PM
  Subject: [amibroker] mixed intraday / EOD, eSignal



  hi,

  I am doing some backtests to finetune the entries of an EOD system. Therefor 
I generate the signals using EOD data and use these signals to find an intraday 
entry.  I use the mixed intraday/EOD mode (eSignal data). The EOD data show up 
nicely in the chart however for the calculations the are not used. So if I 
implement in the code:

  TimeFrameSet( inDaily ):

  the do my EOD signal calculations here

  TimeFrameRestore();

  continue in the intraday timeframe. When in the intraday timeframe it can 
however not see the signals calculated in the Daily timeframe. I use a moving 
average with a long period and therefor it does not find signals because the 
intraday data not have enough days. The EOD data have enough days but 
apparently they are not used in the calculation.

  Is there a trick so that they will be used in the calculation also and not 
just for display purposes in the chart?

  thanks, Ed

   

Reply via email to