Hello all, for backtesting purposes I want to define "nBarsWait" like this:
nBarsWait = 60 - Minute(); ApplyStop(stopTypeLoss,stopModePoint,nStop,1,False,nBarsWait); ApplyStop stopTypeProfit,stopModePoint,nTarget,1,False,nBarsWait); But the applystop function does not allow me to do this. My aim is, that, after a Buy signal was previously generated and the position is closed by applystop function, I want my trading system to wait until the next full hour starts until it is ready again for opening the next Buy position. In realtime trading it should work (see fomula below) but for backtesting with historical data, the applystop function does not accept referencing to the bar“s minute "Minute()". Will appreciate any help. Thanks and regards. Robert _________________________________________________________________ Time = Now(4); CurMinute = int(Time/100%100); nBarsWait = 60 - CurMinute; ApplyStop(stopTypeLoss,stopModePoint,nStop,1,False,nBarsWait); ApplyStop stopTypeProfit,stopModePoint,nTarget,1,False,nBarsWait); _________________________________________________________________ ------------------------ Yahoo! Groups Sponsor --------------------~--> Yahoo! Groups gets a make over. See the new email design. http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/GHeqlB/TM --------------------------------------------------------------------~-> 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 <*> To visit your group on the web, go to: http://groups.yahoo.com/group/amibroker/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
