Help with ATR position sizing
Help with ATR position sizing
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?
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?
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.
If you don't use stop loss, you may need to based on the average loss in historical testing for your position sizing.
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.
The definitions of these quantities (using the same color code) are shown in the bottom image.
- Attachments
-
- definitions.png (36.23 KiB) Viewed 11485 times
-
- Blox_Dual_MA_positionsize_code.png (24.71 KiB) Viewed 11483 times
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.
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.
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.
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.
-
- Site Admin
- Posts: 9015
- Joined: Tue Apr 06, 2004 1:41 pm
- Location: Boston, MA
- Contact:
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.
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.
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.
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 (48.01 KiB) Viewed 10695 times
-
- Site Admin
- Posts: 9015
- Joined: Tue Apr 06, 2004 1:41 pm
- Location: Boston, MA
- Contact:
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
viewtopic.php?t=4725