Run Explore via Object COM model in .NET

I can run a backtest via the Amibroker's Object COM model in .NET (and this works)

        Dim AB = CreateObject("Broker.Application")

        Try
            Dim NewA = AB.AnalysisDocs.Open("C:\AFLTest\Analysis1.apx")

            NewA.Run(2)

            While NewA.IsBusy
                System.Threading.Thread.Sleep(100)
            End While

            NewA.Export("C:\AFLTest\AFLTest.csv") 

            NewA.Close()

        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try

But I also want to run "Explore" as well.

Does anyone know how to do this? I've checked the documentation, but can't find anything unless I'm missing something.

Thanks for your assistance...

1 Like

From AmiBroker Object Model

`Run( Action ) method allows to run asynchronously scan/explorations/backtest/optimizations.
Action parameter can be one of the following values:

0 : Scan
1 : Exploration
2 : Portfolio Backtest
3 : Individual Backtest
4 : Portfolio Optimization
5 : Individual Optimization (supported starting from v5.69)
6 : Walk Forward Test`

2 Likes

Thanks...This works!

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.