Hi,

I think you can't go under the minimum timeframe of your database.  If you
use 5-minute bars, then you can't go under 5-minutes.  Unless I am wrong, I
would suggest a % adjustment for slippage instead.

Best of luck,

Louis

2008/7/16 Peter Braun <[EMAIL PROTECTED]>:

>   How can I sell reliable on close of bar (I'm using 5 minutes bars)?
>
> I've used this code, it tries to sell on last second of the 5 minute bar:
>
> Time = Now(4);
> NumSeconds = int(int(Time/100%100)*60+int(Time%100));
> Newperiod = NumSeconds % TimeFrame >= in5Minute-1;
>
> But it failed yesterday. I suppose, it didn't execute on that last second
> for some reason. But I don't know another way.
>
> Thank you in advance
>
>   Peter
> ------------------------------
> Gesendet von Yahoo! 
> Mail<http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52427/*http://de.overview.mail.yahoo.com>.
>
> Dem pfiffigeren Posteingang.
> 
>

Reply via email to