I had this problem as well. I think that even though you are using
different variable names, you can only manipulate the backtester
object once, ie it is manipulating the same object even though it has
different variable names.



--- In [email protected], "david.weilmuenster"
<[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> In the Custom Backtester, I need to run a nested loop to examine all 
> signals in comparison to a given signal, and have tried the following 
> code to implement a  nested loop:
> 
> for ( sig = bo.getfirstsignal(bar); sig; sig = bo.getnextsignal(bar))
> 
> {
> 
>   for ( sig_2 = bo.getfirstsignal(bar); sig_2; sig_2 = 
> bo.getnextsignal(bar))
> 
>   {
> 
>    ... logic to compare signals
> 
>   }
> 
> }
> 
> -------------------------------------------
> 
> But, the code executes only for the first signal in the outer loop.  
> I.e., it runs the inner loop perfectly, but only for the first signal 
> in the outer loop.
> 
> Any clues as to what I'm doing wrong?  Maybe this isn't possible?  
> Other approaches I should try?
> 
> Thanks,
> David Weilmuenster
>


Reply via email to