Hi Terry, i am taking this up with marcin as well,as most of the code i copied from the users manual...I apprecaite your efforts and will see if that has an efect
Allan--- In [email protected], "Terry" <[EMAIL PROTECTED]> wrote: > > Without trying to understand your code I see several issues: > > Start by putting these two lines AFTER the loop. > > Buy=Buytemp; > Sell=Selltemp; > > The whole point of looping is to control things bar by bar and you have > simply executed the entire backtest on your 3rd and 4th lines. > > Then, towards the end of your code you have this line: > > SetPositionSize( 50, spsPercentOfPosition * ( Buy == > sigScaleOut ) ); > > You can scaleout, but Buy == tests the equivalence of these two lines. > You want Buy = > > Any you need your actual Buy and Sell statements at the end which you > will need to combine with your sigScaleOut since that is assigned to Buy > if you're scaling and the actual buy (Buytemp possibly) needs to be > assigned as well. > > In fact, I'm unclear on exactly how that works. Better check the user > guide on ScaleOut and SetPositionSize. > > Last point: you have many variables in your loop without subscripts [i]. > Just make sure those are numeric variables and not arrays. > -- > Terry > Hi 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/
