iDay shift by date

 

hi everybody..



say that today date is 25.04.2008


extern int shift=0;


i want the iDay to give the date that i want, i.e if i want iDay to be 24.4.2008, then shift must be shift=1

if i want the iDay to be 23.04.2008, then i must set shift=2.



can anyone give me the code or hint, to write this thing? i need it to be that i can set the date for extern.

 
int iBarShift( string symbol, int timeframe, datetime time, bool exact=false)
Search for bar by open time. The function returns bar shift with the open time specified. If the bar having the specified open time is missing, the function will return -1 or the nearest bar shift depending on the exact.
 
phy! thanks. :)