Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 22:00:02 +0000



Post From: Trade Exit Optimization on Actual Historical Trades with Tick Level Backtesting

[2014-09-30 12:21:26]
vegasfoster - Posts: 444
I am pretty sure you can create a custom study that would read an external file containing your trades and enter/exit on those points. Unfortunately, this would be beyond my abilities.

Fortunately, I am pretty sure you could also do this easily with a spreadsheet trading system by creating a table of your trades on one tab and adding formulas to each row evaluating whether the trade time is straddled by A3 and A4 then return +1 if buy or -1 if sell, e.g. if(and(sheet1!A3>A3, sheet1!A4<A3), 1, if(and(sheet1!A3<A3, sheet1!A4>A3), -1, 0)) Assuming your trade time is in sheet2 column A and the formula to evaluate is in sheet2 column Z. Then in K3 enter formula to buy whenever sum of sheet2 column Z is 1 and sell in M3 whenever -1, e.g. =if(sum(sheet2!Z:Z)=1). Probably not work out this simple and some kinks to get through, but this should get you started in the right direction. If you need more help, you can also contact the master at http://sawtoothtrade.com/tag/tomgilb/, if he doesn't respond here.