Viewing dynamic risk/reward

I’ve just built a chart in MooDB to show dynamic risk/reward over the course of a trade. It shows

  • Open Risk - % account change on the remaining open position if the stop loss gets hit. This does not include closed profit/loss.
  • Floating Profit - account change of open unrealized gains or losses
  • Closed Profit - % account change of realized gains for this trade
  • Total Profit – % account change of realized and unrealized gains/losses combined
I’m quite pleased with this because it can show me how risk and reward is dynamic over time. I have a dropdown box with all my trades in (with a filter) and I just select a trade and the graph gets redrawn.

A winning trade taken on the GBPJPY

A winning trade taken on the EURCAD

A losing trade on the USDJPY

Share

MooDB Risk Monitor complete

No trades yet for me this week, I’m trying really really hard not to take “B-Grade” trades. I only want the best “A-Grade” setups. While I’ve been waiting for the markets to yield an A-Grade setup, I finished off the first iteration of MooDB Risk Monitor.

Basically all it does is work out current risk per open trade, closed profit (realized profit) and floating profit (unrealized profit) and total profit (realized and unrealized combined). I have split these up into three groups – by % account, pips and monetary value.

I’ve then aggregated them up so that I also know at all times my global risk (total risk across all open trades). Here’s a screenshot of my first attempt. The Grid at the top is the current open trades and when you click on one, the bottom grid reflects the new values, as you can see tradeId 198 has been clicked.

The database code to retrieve the values was quite tricky to write, but thanks to two friends Gianluca and Lutz, we have managed to get the database engine to return the values to us in real time even when the market is moving. I’m really pleased and will probably tweak the look of it over the coming weeks. This little tool should help me monitor my risk in my live trading account. Here’s a screenshot of my first attempt – all the trades here are dummy trades in my development database.

MooDB Risk Monitor Draft

Share

Moo DB Risk Control development started

As a compliment to the position sizing tool on my New Trade screen in Moo DB, I have now begun development of Moo DB risk control. Now that I am trading real money I need to know my full risk at all times. I could develop a spreadsheet for this pretty easily, but that’s no fun! The database queries for this are pretty mind blowing so I may actually pay someone to write the database queries for me as I would rather spend the time doing phase 3 testing than developing.

In MooDB I have an open trades screen like this:

How I want my Open Trades screen to look

and I want it to show me the following information when I click on an open trade in the grid:

  • Initial Risk taken in pips, % Acct.
  • Open Risk in pips, % Acct. (i.e. if the stop loss gets hit what will the outcome be)
  • Closed realised profit in pips, % Acct.
  • Floating unrealised profit in pips, % Acct.
  • Total profit in pips, % Acct. (if the trade was closed NOW)

When there are multiple entry and exit orders with no limit to the number that can be placed, the SQL gets quite interesting (hard). I’m hoping to get this done within the next week as it’s a feature that I could really benefit from when I have open trades running.

Share

Moo DB now does charts

I’ve worked out how to produce charts from my database, MooDB in ASP.NET. I will now start working on producing all kinds of charts from the database which means I can interpret my trading results quicker as they will be visual. I don’t have to copy and paste from SQL Server into Excel any more,  it will all be done automatically for me. Today I managed to create an equity curve on dynamic data. I can choose the data I want to view like so:

Criteria I can currently choose from

MooDB then produces an aggregated view of the data and an equity curve automatically when the Submit button is pressed. Here’s what the equity curve looks like based on the criteria selected above.

Dynamic Equity Curve produced from MooDB (click to enlarge)

I can look at the equity curve in any way I like at the click of a mouse, which is quite cool. :-) . I want to work out how to put moving averages on it – I’ll do that this week. Here’s an equity curve with the losers removed:

Equity curve with losers removed (click to enlarge)

Here’s one with the winners removed:

Equity curve with winners removed (click to enlarge)

As all the data is presented in a web browser I can use MooDB from any computer on any operating system that is connected to the web server. The web server is not accessible from the internet at the moment, so it can only be accessed at home – however I may open it up at some point so I can query it from anywhere with an internet connection once I am comfortable about the security aspects.

A bit geeky, but I’m well pleased with it.

Share