Home › Forums › Trading System Mentor Course Community › Progress Journal › Darryl’s Journal
- This topic is empty.
-
AuthorPosts
-
August 22, 2016 at 3:46 am #105079ScottMcNabParticipantDarryl Vink wrote:results from 1st month of trading MR system over the russell 1000:
Portfolio return: -1.5%results from 100 MCS over the same period:
would be nice if live results were more in line with the other end of the MCS range :dry:
This is the results for the system I am trading in US on the AUS over the last few years….time to double down? 👿
August 22, 2016 at 9:32 am #105084AnonymousInactiveSaid Bitar wrote:I don’t know about the others but AUG started really bad only the last week profits started to appear and to cover the losses so -1.5% is somehow OK for AUGup until last week i was -3.5%
August 22, 2016 at 10:02 am #105085AnonymousInactiveScott McNab wrote:This is the results for the system I am trading in US on the AUS over the last few years….time to double down? 👿
how has your MOC system faired over august scott?
August 22, 2016 at 11:20 am #102981ScottMcNabParticipantsame system but in US S&P500…
I shoud be up +3% except for mistake on very first night went live and nerves got to me and I forgot to change account size in the exploration for Batchtrader and left it at what I used for paper trading (now have default value in exploration set to $1 so have to update it or I get an errror msg when submit orders)…so ended up with twice the position size I meant to have…luckily it was a good night to make the error….so in effect live results are tracking backtest for Aug
September 11, 2016 at 1:55 pm #105087AnonymousInactivelatest results from MR system (sell on 1st higher close) over russell 1000 from 21/7/2016 till friday:
on thursday the system was +$100 after clawing back from a tough month in august. then thursday became friday
net profit after friday now -4%results all stilll within 100 runs of a MCS. somehow i find this comforting
September 11, 2016 at 2:40 pm #105178AnonymousInactivehave also been quietly (slowly) working on a MOC system to run over asx. i have been testing a MOC system over russell 1000 but due to terrible reliability problems testing the system over IB’s paper trading account i stopped paper trading it. i have done enough testing to know the signals are doing what they are supposed to do so just waiting to go live with it.
my plan is to stop my current us MR system and switch to MOC systems over russell 1000 and asx. just need to do a little more work until i am happy with asx system before the switch.September 11, 2016 at 3:55 pm #105179Nick RadgeKeymasterBe watchful of commission drag on ASX.
September 11, 2016 at 4:02 pm #105181AnonymousInactiveNick Radge wrote:Be watchful of commission drag on ASX.shall do… :dry:
September 24, 2016 at 12:57 pm #105182AnonymousInactivehave done lots of backtests recently regarding a MR MOC system over the russell 1000 and MR moc-MOC system over the asx all ords.
finally have finished the tests, setup a vps and have new batchtrader for managing trades over the asx.
first 23 orders from US MR MOC system placed on friday with 6 orders filled. vps and batchtrader ran and executed without a hitch. first 0.4% profit on the board
for the vps i ended up going with hostwinds ssd windows tier2 and upgrading to tier3 after using almost all my space installing amibroker, premiumdata, tws and office apps. when they say you get a server with 30GB i didnt factor in that 15GB with be gone with the server os installation :huh: system is running well with very little lag.
September 25, 2016 at 3:30 pm #105288AnonymousInactivenow that i have increased “feelings” of reliability of service by using a vps, im thinking of semi-automating my trading somewhat.
ive written a script to do the following:
– automatically run an exploration of a choice of systems in amibroker using the latest account balance and export the results to a csv file.
– automatically start and login to tws using IBController
– automatically start BatchTraderas it stands at the moment all that is needed (apart from running the initial script) is to press load and send in BatchTrader.
the only thing stopping full automation is the abilty to automatically load csv file into BatchTrader and send it to tws. i have sent levente an email about this and he has suggest a good option that involves having a configuration that would load given csv files at given times and send the orders.
i dont want to fully automate the process in reality without at least a quick check that things are ok but having the ability to login to the vps and click once is appealling!
September 25, 2016 at 9:29 pm #105296Nick RadgeKeymasterHere is some code that we used many years ago to send a csv file to a C drive if it helps:
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//CSV Export File//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////stringsSt0 = IIf(Le==1,1,0); //entry set up
St1 = Close; //last close price
St2 = IIf(Le==1,IS,0); //initial stop
St3 = IIf(Buy==1,1,0); //buy
St4 = IIf(Buy==1,BuyPrice,0); //buy price
St5 = IIf(exitsetup==1,1,0); //exit set up
St6 = IIf(Sell==1,1,0); //sell
St7 = IIf(Sell==1,SellPrice,0); //sell price
St8 = IIf(Sell==1 OR Lbit>=1,lStopArray,0); //trailing stop price
St9 = WriteIf(Indexfilterup,”Up”,”Down”); //index filter Up/Down
St10 = WriteIf(Lbit>0 && Lstoparray > Ref(Lstoparray,-1),”Move Trail Stop to ” + LStopArray,””); //move trailing stop comment//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if( Status(“action”) == actionExplore)
{myDate = StrReplace(Now(1),”/”,””);
dd = StrLeft(myDate,2);
mm = StrMid(myDate,2,2);
yyyy = StrRight(myDate,4);
filename = yyyy+”-“+mm+”-“+dd;if( Status(“stocknum”) == 0 )
fh = fopen( “c:\TrendSmart_2012\AmiBrokerFiles\”+filename +”_ASX100.csv”, “w” );
else
fh = fopen( “c:\TrendSmart_2012\AmiBrokerFiles\”+filename +”_ASX100.csv”, “a”);if(fh)
if( Status(“stocknum”) == 0 )
{
fputs( “Symbol, Date, Long Setup: Buy Next Bar Open,Last Close Price,Long Setup: Inital Stop,Buy,BuyPrice,Exit Setup: Sell Next Bar Open,Sell,Sell Price,Trailing Stop Price,Bars in Trade,Turnover,Index,Comment n”, fh );
}if( fh )
{if( Filter[BarCount-1])
{fputs( Name(), fh );
fputs( “, “, fh );fputs( Now(1), fh );
fputs( “, “, fh );qs = StrFormat(“%.3f, “, St0);
fputs( qs, fh );qs = StrFormat(“%.3f, “, St1);
fputs( qs, fh );qs = StrFormat(“%.3f, “, St2 );
fputs( qs, fh );qs = StrFormat(“%.3f, “, St3 );
fputs( qs, fh );qs = StrFormat(“%.3f, “, St4 );
fputs( qs, fh );qs = StrFormat(“%.3f, “, St5 );
fputs( qs, fh );qs = StrFormat(“%.3f, “, St6 );
fputs( qs, fh );qs = StrFormat(“%.3f, “, St7 );
fputs( qs, fh );qs = StrFormat(“%.3f, “, St8 );
fputs( qs, fh );qs = StrFormat(“%.f, “, Lbit );
fputs( qs, fh );qs = StrFormat(“%.f, “, V*C );
fputs( qs, fh );fputs( St9, fh );
fputs( “, “, fh);fputs( St10, fh );
fputs( “, “, fh);fputs( “n”, fh );
}
fclose( fh );
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
_SECTION_END();
September 26, 2016 at 4:42 am #102982JulianCohenParticipantI’m impressed!
How do you automatically get the account balance?
September 26, 2016 at 6:47 am #105297AnonymousInactiveDarryl Vink wrote:ive written a script to do the following:
– automatically run an exploration of a choice of systems in amibroker using the latest account balance and export the results to a csv file.
– automatically start and login to tws using IBController
– automatically start BatchTraderhere is the script. there are a few things going on here and it relies upon IBController being properly setup and configured (not that hard!). script is alson attached as a zip file for those interested in hacking it to suit their needs. i recommend downloading the zip file and opening autoExplore.js in a code editor that highlights syntax (something like notepad++) if interested:
Code://——————————————————————————————
//——————————————————————————————
// description:
// script to automatically perform the following tasks:
// – start Amibroker and execute an Exploration using an updated account balance
// – export the Exploration results to csv file
// – launch TWS automatically using IBController
// – launch Batchtrader
//
// autoExplore.js syntax: autoExplore.js [-s sysName] [-c initialCapital]
//
// options:
// – s
// the name of the system to run the exploration over
// eg: asx,us
// – c
// number representing the amount of capital to use for position sizing
//
// usage:
// open a command prompt and change to directory where the file “autoExplore.js” is saved.
// eg: from command prompt type the following:
// wscript.exe autoExplore.js -s asx -c 100000
//——————————————————————————————-
//——————————————————————————————-// setup some date variables used for the csv file naming
today = new Date();
dd = today.getDate();
mm = today.getMonth()+1;
yyyy = today.getYear();if (dd < 10) {dd = '0' + dd} if (mm < 10) {mm = '0' + mm} //---------------------------------------------------------------------------------- // loop through command line options: system name and capital. // // i have used two systems, "us" and "asx" // edit these to suit your needs //---------------------------------------------------------------------------------- // default parameters sysName = "us"; accntBalance = 100000; args = WScript.arguments; for (i = 0; i < args.length; i++) { switch(args(i)){ case "-s": switch(args(i+1)){ case "asx": sysName = "asx"; break; case "us": sysName = "us"; break; default: sysName = "us"; } break; case "-c": accntBalance = Number(args(i+1)); break; } } //---------------------------------------------------------------------------------- //---------------------------------------------------------------------------------- // setup the path to files based on systems being used. // // below assumes files needed are kept in following directory structure: // D:Document_DTradingtrades"systemName" // edit dirPath below to suit your needs and setup up the directories needed. // eg: // amibroker exploration files for asx and us are: // D:Document_DTradingtradesasxasx_exploration.apx // D:Document_DTradingtradesusus_exploration.apx // // csv files with trade orders get saved to: // D:Document_DTradingtradesasxasx_tradeOrders_25092016.csv // D:Document_DTradingtradesusus_tradeOrders_25092016.csv //---------------------------------------------------------------------------------- dirPath = "D:\Document_D\Trading\trades\" + sysName + "\"; csvFile = dirPath + sysName + '_tradeOrders_' + dd + mm + yyyy + '.csv'; analysisFile = dirPath + sysName + "_exploration.apx"; //---------------------------------------------------------------------------------- // open the analysis file and read all text try { fileObject = new ActiveXObject("Scripting.FileSystemObject"); file = fileObject.OpenTextFile(analysisFile,1); analysisText = file.ReadAll(); file.Close(); } catch (err) { WScript.echo( "Exception: " + err.message ); } //---------------------------------------------------------------------------------- // search and replace the new account balance // // the text to search here will depend on where your Account Balance is defined in // your AFL DDE eploration script. check your DDE script and modify to suit. //---------------------------------------------------------------------------------- searchText = ""Explorer: Account Balance",100000"; replacementText = ""Explorer: Account Balance"," + accntBalance; analysisText = analysisText.replace(searchText, replacementText); //---------------------------------------------------------------------------------- // reopen the analysis file and write the accnt balance try { fileObject = new ActiveXObject("Scripting.FileSystemObject"); file = fileObject.OpenTextFile(analysisFile,2,true); file.Write(analysisText); file.Close(); } catch (err) { WScript.echo( "Exception: " + err.message ); } //---------------------------------------------------------------------------------- // setup and run an exploration in amibroker. // explorations and backtests can be run from outside amibroker 🙂 //---------------------------------------------------------------------------------- amibroker = new ActiveXObject("Broker.Application"); // creates AmiBroker object // open the analysis project file, run the exploration and export results to csv file try { // open saved analysis project file newAnalysis = amibroker.AnalysisDocs.Open(analysisFile); if (newAnalysis) { newAnalysis.Run(1); // start exploration asynchronously while (newAnalysis.IsBusy) WScript.Sleep( 500 ); // check IsBusy every 0.5 second newAnalysis.Export(csvFile); // export result list to csv file newAnalysis.Close(); } } catch ( err ) { WScript.echo( "Exception: " + err.message ); // display error that may occur } //---------------------------------------------------------------------------------- // run IBController. // assuming IBController is installed in C:IBController //---------------------------------------------------------------------------------- shell = WScript.CreateObject("WScript.shell"); shell.CurrentDirectory = "C:\IBController"; shell.run("C:\IBController\IBControllerStart.bat"); //---------------------------------------------------------------------------------- // run BatchTrader. // assuming BatchTrader is installed in C:BatchTrader-v1.3.0 //---------------------------------------------------------------------------------- shell = WScript.CreateObject("WScript.shell"); shell.CurrentDirectory = "C:\BatchTrader\BatchTrader-v1.3.0"; shell.run("C:\BatchTrader\BatchTrader-v1.3.0\BatchTrader.exe");
September 26, 2016 at 6:54 am #105301AnonymousInactiveJulian Cohen wrote:I’m impressed!How do you automatically get the account balance?
well i havent figured out how to automatically get it from amibroker yet. perhaps its possible…
at the moment i just pass it as a command line parameter to the sriptSeptember 26, 2016 at 7:56 am #105306JulianCohenParticipantI think this might be a little bit beyond my capabilities at the moment but it looks sexy
-
AuthorPosts
- You must be logged in to reply to this topic.