Hi, Any help explaining the strange output from the simple code below would be very much appreciated. :)
It should exit after 10 bars. Strangly, explorer shows the exit *sometimes* takes around 20 days. I've tried exRemSpan to eliminate extra buy signals, but the sell order still always doesn't execute after 10 days. Buy = Random() > 0.975 ; // Buy on a random day Sell = BarsSince( Buy ) >= 10; // Sell after 10days..pretty please //Buy = ExRemSpan( Buy , 10) ; // Dont raise buy signals for 10 days Buy = ExRem( Buy , Sell ) ; Sell = ExRem( Sell , Buy ) ; //EXPLORER SETTINGS */ Filter = Buy OR Sell; AddColumn( Buy, "Buy", 1 ); AddColumn( Sell, "Sell", 1 ); AddColumn( BarsSince( Buy ), "BarsSinceBuy", 1 ) ; //show me barsince Many thanks Andy
