Home › Forums › Trading System Mentor Course Community › Progress Journal › Wayne V’s Journal
- This topic is empty.
-
AuthorPosts
-
May 20, 2020 at 3:05 am #102014Wayne VerneyParticipant
Hello all! I’ve been guilty of not updating the forum – which I guess only does myself a disservice! Anyhow, now 3 months on board and have made (in my mind at least) great progress. Running through course material for a second time now and discovering a lot more, I’d previously thought I had a handle on.
Now running backtesting on (purchased from Nick) MR system, while still working on my WTT code. I’ll be trading US Long only for now.
Also have been working on DDE API and hooked into IBKR, which I’ve been paper trading for a little over a week, to get comfortable that I understand the mechanics of everything . In conjunction with this I’ve set up the STT and started uploading trades to the tracker. Aside from Nicks API , does anyone have any advice on API’s, as I’ve really struggled to get full functionality the TWS supplied API.
Thanks
AlsoMay 20, 2020 at 6:40 pm #111473AnonymousInactiveHey Wayne – I’m always down to talk automation of mundane tasks. I’ve peaked through the TWS documentation scheming on a way to have a simple Python script that will ask the API for the account NLV and then write that into the .afl file daily so that you could omit the step of manually telling Amibroker what your account balance is. The caveat there would be if you were running multiple systems then you would need to distribute that cash somehow. Likely, though, it would be easier to get said information from your STT sheet, as there are many more tools to have Python interact with a local .xlsm.
That doesn’t solve the issue of needing to export the data from TWS in order to import it into STT. I can’t seem to find if this can be done via IB Gateway (which I would prefer, but I can’t find any documentation about that in their API docs), but likely you could just have said script do it through IB TWS. At that rate, then, you could also have the script manage the auto logout and login that I also loathe.
Nick shakes his head [virtually] when I whine about these things – and let’s be straight here; I’m a spoiled computer nerd who only wants programs to work in the way that I imagine them to be best. I’ll admit it.
Why can’t we have Amibroker on Linux, again?!!? Damnit. Damn. It. And I’ll not mention Share Trader Tracker on Linux, either. Stupid VBA. D-a-m-n-i-t.May 21, 2020 at 7:53 am #111477Wayne VerneyParticipantSeth, appreciate your response and obviously touched a nerve. Your skills are also obviously way more advanced than mine, however I’ll continue to plug away and monitor any posts of yours in this regard as I’ll continue to seek knowledge.
Thanks
May 21, 2020 at 2:37 pm #111489AnonymousInactiveNope – no nerve touched. I’m just at home in quarantine, and I’m long winded.
And it’s unlikely that my skills are more advanced, unless you are talking about coding Bitcoin trading bots with Python and then subsequently losing money. In that case, yeah, I’m pretty damn good…Cheers!
And monitoring my posts….yikes. Better get Nick or Craig to tell you the stupid things I’ve asked and/or done first. Hah!
May 22, 2020 at 6:48 am #111478SaidBitarMemberSeth Lingafeldt wrote:Hey Wayne – I’m always down to talk automation of mundane tasks. I’ve peaked through the TWS documentation scheming on a way to have a simple Python script that will ask the API for the account NLV and then write that into the .afl file daily so that you could omit the step of manually telling Amibroker what your account balance is. The caveat there would be if you were running multiple systems then you would need to distribute that cash somehow. Likely, though, it would be easier to get said information from your STT sheet, as there are many more tools to have Python interact with a local .xlsm.Python script can open STT and read the equity for each system, then connect with IB to get the total account value (just to be sure that the values are not off). When you have all the values then with some scripts you can open Amibroker set the account value, run the exploration and extract the CSV file. Another script or screen automation can place your orders.
Seth Lingafeldt wrote:That doesn’t solve the issue of needing to export the data from TWS in order to import it into STT. I can’t seem to find if this can be done via IB Gateway (which I would prefer, but I can’t find any documentation about that in their API docs), but likely you could just have said script do it through IB TWS. At that rate, then, you could also have the script manage the auto logout and login that I also loathe.there are many ways for this to be done, soon i can tell you how i do it (still some stuff to be done) but here what you can do in IB create FLEX report then you can request the flex report on a daily basis based on specified time. In python you can extract the data from the imported report and then add them to STT. Finally run the macro.
To be honest i do not know python but if i will do it in C# this is what i will do.
regarding auto login/out i believe IB gateway doesn’t require the daily log outlike this you can have almost all automated, but where is the fun
for me it takes less than 5 minutes a day for multiple MOC systems
around 30 seconds to update the trades from previous day
another 30 seconds to run exploration
the thing that takes lots of time is when i place my orders in TWS i have a new message started to appear recently and i have to close it one by one for each order this is my pain
the message i think is about IB auto thing no idea what never read itMay 26, 2020 at 1:25 am #111491AnonymousInactiveHey Said,
Thanks for the replies! I figured that getting a script to open the STT sheet and pull values for each system would be fairly simple – and that’s a good idea for double checking those numbers with the NAV in IB to make sure that the values are correct. Smart. Writing that value to the AFL or just setting the value inside of the parameters box should both be doable like you mention.
I have not interacted with the FLEX reports at all. This will give me something to do for the next few days.
Python, C#, whatever… a task like this can be done with either. The heavy lifting and number crunching is already done for us in Amibroker and SmartAPI. Gateway and TWS are identical from the API’s perspective, so that part doesn’t matter either.
I’m getting used to the daily task of running the systems, but I am stuck inside and with quarantine my brain is just thinking of many options for the future.
Thank you for the reply. We will have to chat more some time. Cheers!
May 27, 2020 at 12:43 am #111499Wayne VerneyParticipantReally meant to dial in last night, but kids got hungry…
Can anyone tell me why my code (entire code) in the Formula Editor turns ‘Pink’ occasionally?
Currently running a MR system in paper trading to ensure I understand the mechanic’s, but seems almost impossible to fill any order. Adjusting the stretch down seems to make no difference, and would like to run through a number of completed buy/sell cycles before taking the next step.
Meanwhile almost completed writing my WTT system.And, like Seth, I’m spending a lot of time getting used to a daily routine, and collecting ideas.
Hope Nick remembered to hit record.
Thanks.
May 27, 2020 at 2:20 am #111503Nick RadgeKeymasterWayne,
Please book a call with Craig.Nick
May 27, 2020 at 2:44 am #111504Wayne VerneyParticipantNick, thanks, will do.
June 26, 2020 at 5:13 am #111474Wayne VerneyParticipantGents interested in your views on Ranking Metric’s ?
Seems (to me) that for an RSI exploration based system, using RSI to also rank results, makes for a rational approach?
For a trend following system using, say an ADX or ROC metric for signals, would this same approach seem sensible?
Interested in ideas for combinations that complement without being a repetition of filters already applied.
June 26, 2020 at 6:08 am #111730GlenPeakeParticipantHi Wayne,
I guess the short answer is (and this is something you will probably see/hear on the forums a bit) to test different approaches … from time to time you’ll test using one metric that’ll make perfect logical sense, only to see it fail miserably in a backtest and the idea that you were sure probably wouldn’t make much of a difference, from time to time is the ingredient that adds a bit of ‘Zing’ to the system.
For me, ranking on an Absolute Trend Following system like a Weekend Trend Trader is less important, as it’ll only come into play once your close to you 100% invested allocation… i.e. your holding 18 positions and have 2 more spots available for a MAX of 20 positions and then 3 new signals popup… the ranking will select the top 2 and flick the 3rd… so you’re not using the ranking ‘constantly’/day to day etc….
For a Short term MOC/MR system…. it becomes super important and generally most lean towards a volatility based RANK… e.g. ATR / ROC or some other VOLA indicator or combo
For a Rotational system, again important, as this is how you’ll measure your relative momo for your stocks/systems… so something like a combo of ROC / ATR / RSI etc etc etc endless possibilities.
Sometimes ranking with an RSI and then mixing and matching with a VOLA indicator like ATR can be the path to finding what your looking for…..
But, try heaps of different combos and experiment would be the best suggestion.
June 26, 2020 at 6:42 am #111731Wayne VerneyParticipantGlen, really appreciate your response, you’ve covered it quite clearly.
Thanks.
June 26, 2020 at 7:08 am #111732AnonymousInactiveOn Trend/Momentum systems I have used Linear Regression of the Slope before to some success.
Also in a relative momentum way, by comparing to the underlying index of the universe you are trading.
Like this…..
IndexCodeC = ParamStr(“Reference Index: S&P500″,”$SPX”);
IndexC = Foreign(IndexCodeC,”C”);SlopeRange = Param(“Slope Calc. Range”,10,2,1000,1);
TickSlope = (LinRegSlope(C,SlopeRange) * 10000) / C;
IndexSlope = (LinRegSlope(IndexC,SlopeRange) * 10000) / IndexC;
Rank = TickSlope – IndexSlope;
The concept is that the slope of the symbol needs to be greater than the slope of the index, which might indicate that the symbol is growing at a greater rate than that of the index. Any positive number would indicate this, any negative number would prove the symbol growing at less of a rate than the index.
I have generally found that it only works when you are looking at the slope greater than about 5 to 10 bars. Any less than this whilst it still works, it seems to be a little bumpy. As I am guessing you are probably looking for a trend or growth greater than say a month or so, this is probably fine anyways.
I have found if trading weekly or monthly then about 50 or 60 days is good to measure recent trends. you might even try longer periods like 250 days if wanting stocks trending for a year. Andreas Clenow does something similar for a 90 day period. Read his book “Stocks on the Move” if you are interested.
p.s. I also put a condition of TickSlope > 0 in my entry conditions to make sure the symbol itself is also slope above 0.
June 26, 2020 at 7:42 am #111733Wayne VerneyParticipantMatthew, very much appreciate the ideas. I’ve got a copy of “Stocks on the Move”, which I need to revisit.
Thank you.
-
AuthorPosts
- You must be logged in to reply to this topic.