Login Page - Create Account

Support Board


Date/Time: Sat, 04 May 2024 22:20:11 +0000



Trade size % when backtesting

View Count: 779

[2016-06-18 16:19:32]
JamesP - Posts: 89
Hello,
When using the spreadsheet for auto backtesting is there a way to set a sim account size and risk a percentage of the account on each trade. For example risking 2% of a simulated $100 000 account?
[2016-06-18 21:54:23]
Sierra Chart Engineering - Posts: 104368
No.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2016-06-18 22:20:07]
Sawtooth - Posts: 3993
You could use a formula in J26 that used a % of the sum of J11 and an acct balance value.
However, read the documentation on J11:
http://www.sierrachart.com/index.php?page=doc/doc_SystemsAlerts.php#CellJ11
[2016-06-20 15:07:14]
JamesP - Posts: 89
Hi Tom,
Thanks for the response, any/all advice you provide is helpful to help work problems out. I guess the issue is I can only take a % of J11 once it has reached a certain profit level and not from the beginning of the backtest? For example if I wanted to trade 2% of a starting value of $50 000 its not possible because I can't pre set the value of cell J11 correct?
[2016-06-20 16:43:56]
Sawtooth - Posts: 3993
I assumed you wanted your Order Quantity (J26) to be based on a % of $50,000 + J11.
At the beginning of a backtest, J11 will be 0, so the sum of 50k and 0 is 50k. After each exit J11 will be a new value, so each subsequent entry quantity will be based on a % of a new value.

Do you want to use a certain % of 50k until J11 reaches a certain value, then use a different %?
Can you give a detailed example of specifically what you want to do?
[2016-06-20 19:48:35]
JamesP - Posts: 89
Your initial assumption was was right. Apologies if I'm missing something but I still can't work out a formula for J26 that allows an order quantity based on a percentage of J11. Ideally what I would like to do is trade one contract for a specific amount such as 1 contract per $8000. Once the account(or in this case J11) makes an additional $8000 then an additional contract would be added. So starting off with say $50 000 the order quantity would be 6 and once J11 reached $58 000 the order quantity would be 7 etc.
[2016-06-20 23:06:45]
Sawtooth - Posts: 3993
OK, try this in J26:
=FLOOR((48000+J11)/8000)

Since 50,000 is not evenly divided by 8,000, I used a 48,000 example.
With 48000 and J11 at 0, the quantity is 6.
With 48000 and J11 at 7999 (55999 total), the quantity is 6.
With 48000 and J11 at 8000 (56000 total), the quantity is 7.
With 48000 and J11 at -8000, (42000 total) the quantity is 5.
The quantity changes at multiples of 8000.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account