Profile Picture

RightEdge via Command Line

Posted By lampalork 4 Months Ago
Message
Posted Monday August 14 2017
Hi All,
I managed to run RightEdge via command line (simulations and optimizations). How do i access to the results generated (for both cases: simulations and optimizations) afterwards? I'd like to automate optimization based on genetic algo or stuff like this.

Also, i'd like to use this command line to automate out of sample testing or multiple periods. is there a smart way for me to pass these simulation start/end dates or am i left with modifying the *.rep file on the fly for my need?

Many thanks
Cheers
Lamp'
Post New Topic
Posted Saturday August 19 2017
Hi Lampalork,

I created a SQL Server database and made RightEdge to store all positions, orders and equity curve on it, then I fetch all the data in Excel and do all analysis there.

There may be other ways, but I´ve managed to control RightEdge with command line by adding a piece of code like this:


OptimizationParameters=Environment.GetCommandLineArgs(); //Get the parameters from batch command, if any
if(OptimizationParameters.Length==9)
{//System is set up for optimization!
SystemName=OptimizationParameters[5];
RankingLookBackDays=Convert.ToInt32(OptimizationParameters[6]);
ATRrankingDays=Convert.ToInt32(OptimizationParameters[7]);
BreakoutDays=Convert.ToInt32(OptimizationParameters[8]);
}


The first 5 parameters in my case being RightEdge path, watchlist, rightedge project, /S (simulate) /E (exit)
Then I run this on batch command:

SET RE="C:\Program Files (x86)\Yye Software\RightEdge 2010\RightEdge.exe"
SET Watchlist=/W:"StockWatchlist"
SET Project=/P:"C:\Users\matac\Systems\Stocks\Stocks.rep"
:: SystemName, RankingLookBackDays, ATRrankingDays, BreakoutDays

:: SENSITIVITY RUNS
REM start /wait "" %RE% %Watchlist% %Project% /S /E stockTF1 100 60 125
REM start /wait "" %RE% %Watchlist% %Project% /S /E stockTF2 125 60 125
REM start /wait "" %RE% %Watchlist% %Project% /S /E stockTF3 150 60 125
REM start /wait "" %RE% %Watchlist% %Project% /S /E stockTF4 200 60 125

Hope it helps...

Regards,
Carlos Mata
Posted Sunday August 20 2017
Hey Carlos,
Simple but flexible enough. thanks a lot for the tips!
Lamp' 

Posted Tuesday August 22 2017
All, in the end, i found that writting my own optimization plugin was more suitable to my needs. Simple proof of concept attached.
Cheers',
Lamp' 

Attachments
CustomizedOptimizationPlugin.zip (22 views, 6.00 KB)


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems