Hi - You can shift the arrays to the left by using Ref with a positive number...

CPctOne = ref( CPct0, 1 );
CPctTen = ref( CPct0, 10 );
PlotShapes( IIF( CPctOne...
PlotShapes( IIF( CPctTen...

Steve

  ----- Original Message ----- 
  From: Vinay Gakkhar. 
  To: Amibroker 
  Sent: Saturday, August 29, 2009 8:34 PM
  Subject: [amibroker] Please help in my formula


  Can anyone please help me?

  I have the following formula:

  Plot (C, "Close", colorBlue, styleThick, Null, Null, 0);
  CPct0 = (C-(Ref(C,-1)))*100/(Ref(C,-1)) ;
  PlotShapes( IIf( CPct0 >= 4, shapeHollowUpArrow, shapeNone ) , colorPaleGreen 
);
  PlotShapes( IIf( CPct0 <= -4 , shapeHollowDownArrow, shapeNone ) , colorGold 
);

  This gives me arrows after my condition of CPct0 >= 4 or CPct0 <= -4 is met.

  What should I change so that I get TWO arrows - the first arrow one bar 
before my condition is met, and the second arrow 10 bars before my condition is 
met.

  Thanks, and regards,

  Vinay Gakkhar 

Reply via email to