Help with ATR position sizing

Discussions about Money Management and Risk Control.
Post Reply
Matthader
Contributing Member
Contributing Member
Posts: 7
Joined: Tue Jul 15, 2008 10:39 pm

Help with ATR position sizing

Post by Matthader » Fri May 22, 2009 12:18 pm

I want to trade Forex with the Dual Crossover with no SL. Under the TradingBlox they use 1% per trade I believe based on some calculation of ATR. Can anyone who understands how they come up with this figure please give an example?

Is it as simple as taking 1% of your bankroll and then dividing that amount by the 15 day ATR? Then buying that many lots?

kingami
Full Member
Full Member
Posts: 15
Joined: Mon May 04, 2009 12:59 am
Location: Atlanta

Post by kingami » Fri May 22, 2009 3:39 pm

ATR based position sizing assumes that you use stop loss which is away from your entry price in the distance of a number (normally 2 to 5) of 15 day ATR average. Divide 1% of your equity by that distance to get the number of lots you would trade.

If you don't use stop loss, you may need to based on the average loss in historical testing for your position sizing.

Matthader
Contributing Member
Contributing Member
Posts: 7
Joined: Tue Jul 15, 2008 10:39 pm

Post by Matthader » Sat May 23, 2009 11:50 am

Yes I'd like to use the method utilized in the backtest for Forex in Trading Blox Dual Crossover system. Does anyone know the calculation they used?

sluggo
Roundtable Knight
Roundtable Knight
Posts: 2986
Joined: Fri Jun 11, 2004 2:50 pm

Post by sluggo » Sat May 23, 2009 6:17 pm

Here's the actual software code used by the Dual Moving Average system that comes with Blox (top image). Important quantities are encircled in different colors.

The definitions of these quantities (using the same color code) are shown in the bottom image.
Attachments
definitions.png
definitions.png (36.23 KiB) Viewed 8447 times
Blox_Dual_MA_positionsize_code.png
Blox_Dual_MA_positionsize_code.png (24.71 KiB) Viewed 8445 times

Matthader
Contributing Member
Contributing Member
Posts: 7
Joined: Tue Jul 15, 2008 10:39 pm

Post by Matthader » Sat May 23, 2009 9:05 pm

Within the Blox users guide it says that it uses a theoretical stop of 1 ATR for position sizing when you elect not to use stop loss.

But when I go through the trades I still can't seem to make since of it. Are they using a 39 day ATR or 15 day? Lets say it was 65 pips. What steps do I need to follow from there for Forex?

I apologize for asking such a newbie question.

sluggo
Roundtable Knight
Roundtable Knight
Posts: 2986
Joined: Fri Jun 11, 2004 2:50 pm

Post by sluggo » Sun May 24, 2009 10:40 am

You seem to be asking two different questions: (Q1) Where does "1 ATR" appear in the positionsizing calculations; (Q2) How many bars of price data are used to calculate the ATR?

The answers are: (Q1) In lines 7-11 of the code shown above; (Q2) The human user (who is running Blox software) specifies the #bars, circled in blue above.

Please note that the example above is running on a portfolio of 6 Forex instruments, taking "All" trades (Longs and Shorts) that the system signals.

Matthader
Contributing Member
Contributing Member
Posts: 7
Joined: Tue Jul 15, 2008 10:39 pm

Post by Matthader » Sun May 24, 2009 11:26 am

Ok I see that when I change the amount of days from 39 to 15 and run them that the trade posiiton sizes do change. I just don't understand what the system does after it has the ATR to come up with how many lots to trade.

Tim Arnold
Site Admin
Site Admin
Posts: 8500
Joined: Tue Apr 06, 2004 1:41 pm
Location: Boston, MA
Contact:

Post by Tim Arnold » Sun May 24, 2009 2:35 pm

The Fixed Fractional Money Manager uses the amount of equity to risk divided by the trade risk as the number of contracts or shares to trade.

So take the percent risk (risk per trade times the equity) and divide by the risk of the trade ( in this case one atr times the dollars per point ) and that will give you the quantity to trade.

For forex, the dollars per point is based on the "forex trade size" as defined in the global parameters. So for an excel audit, determine the dollars profit per pip based on the trade size of your broker and as defined in the global parameters, multiply by the atr in pips, and that is your denominator.

Note also that we use an exponential moving average for the ATR, so a 39 in this case is equivalent to a 20 "day" Wilder atr. See the manual for a more complete explanation.

Matthader
Contributing Member
Contributing Member
Posts: 7
Joined: Tue Jul 15, 2008 10:39 pm

Post by Matthader » Sun May 24, 2009 5:25 pm

Thanks so much everyone for taking the time to help me out. I was mistakenly multiplying the entry price, and for FX it should not matter. Cool.

benavju
Contributor
Contributor
Posts: 4
Joined: Sun Sep 20, 2009 10:11 pm

Post by benavju » Thu Oct 01, 2009 10:24 pm

Hi I am new at using Trading Blox, I am testing a DMA System with Forex (Majors Only). I run a simulation and I want to know where I can find the actual ATR and the Dolar point value for every trade. I am trying to understand the positon sizing for every trade :?:
Thanks in advance for the help.

matthew28
Senior Member
Senior Member
Posts: 41
Joined: Wed Nov 07, 2007 1:40 pm
Location: United Kingdom

Post by matthew28 » Sat Oct 03, 2009 11:05 am

Hello,
If you go to the File menu and look under Results and then Trade Log you will find the details of each trade. The DPP columns are Dollars Per Point. The TB User's Guide will give you more information in the section related to Log Files.
For a list of ATR values, assuming you have the Builder version of TB you could write the code:

PRINT instrument.date, instrument.symbol, instrument.averageTrueRange

in the After Instrument Day script for end of day data where the ATR indicator is called 'averageTrueRange.

Or

PRINT instrument.date, instrument.time, instrument.symbol, instrument.averageTrueRange

in the Update Indicators script for intraday data.
After the test go to the File menu again under Results but this time select Print Output and Excel will open with a spreadsheet showing the results, as below.
Attachments
Capture.JPG
Capture.JPG (48.01 KiB) Viewed 7657 times

Tim Arnold
Site Admin
Site Admin
Posts: 8500
Joined: Tue Apr 06, 2004 1:41 pm
Location: Boston, MA
Contact:

Post by Tim Arnold » Sat Oct 03, 2009 11:12 am

With the Pro Edition, you can use the Plot ATR block from the blox marketplace, to plot the atr and see the values for each day.

viewtopic.php?t=4725

Post Reply