| 
 Hello , 
  
I have charts set to hourly and below is the 
code i have for computing daily pivots. I would like to know if the market is 
closer to the pivot or not. So i have the below code to alert if the market is 
about 10 pips near pivot. Can someone tell me if this code is correct? 
Thanks 
  
Cheers,Padhu 
PS: For some reason the below code is not 
generating alerts at all. 
  
//Chart is running in Hourly 
// Compute Pivots from Daily data 
TimeFrameSet (inDaily);
P = ((H + L + C) /  3);
R1 = (( 2 * P) - 
L);
S1 = (( 2 * P) - 
H);
R2 = ((P - S1) + R1); 
R3 = (P -S1)+ R2; 
S3 = P - (R2 - S1); 
S2 = (P - (R1 - S1)); 
TimeFrameRestore ();
Daily_Pivot =  TimeFrameExpand( P, inDaily ); 
Pivot_Approach_Alert1=(H-Daily_Pivot) <  0.0010 AND (H-Daily_Pivot) > 0;
Pivot_Approach_Alert2=(L-Daily_Pivot) < 0.0010 AND (L-Daily_Pivot) > 
0 AND C > 
Daily_Pivot; 
AlertIf(barcomplete AND Pivot_Approach_Alert1, "EMAIL", " Pivot_Approach_Alert1 BuyStop =" + WriteVal 
(Daily_Pivot+0.0020,15.4) + " 21P_Low is = 
" + WriteVal(LLV( Low, 21 ),1.4) + " Pivot is " + WriteVal (Daily_Pivot,15.4) + " Difference is " +WriteVal((L-Daily_Pivot),1.4) + WriteIf(m1 >0," Uptrend"," DownTrend") +WriteIf(IsPrime( Number_Low 
)," Prime_Low"," "), 1 ); 
AlertIf (barcomplete AND 
Pivot_Approach_Alert2, "EMAIL", " Pivot_Approach_Alert2 BuyStop =" + 
WriteVal 
(High+0.0010,15.4)+" 21P_Low is = 
" + WriteVal(LLV( Low, 21 ),1.4) + " Pivot is " + WriteVal (Daily_Pivot,15.4) + " Difference is " + 
WriteVal((L-Daily_Pivot),1.4) +WriteIf(m1 >0," Pullback in Uptrend","-") +WriteIf(IsPrime( Number_Low 
)," Prime_Low"," "), 4 ); 
  
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 other support material please check also: 
http://www.amibroker.com/support.html 
 
  
 
 
Yahoo! Groups Links 
 |