Would it be possible to use actual real life trading history, entries and exits as input for AI to create a strategy? It would try to make a set of rules, that would try to trigger those actual (or made up) trades as flawlessly as possible. As a way to evaluate the strategy, there could be % number of how close AI gets to those trades that were used as input. 100% would be complete identical trades compared to input.
For example when I am scalping, there is not always clear set of rules that I follow. It is more about knowing in my gut when to enter or exit. It would be nice to try to create a strategy based on my trading history, and see if AI would be able to "see" some base rules that would be possible to made into a strategy
For example when I am scalping, there is not always clear set of rules that I follow. It is more about knowing in my gut when to enter or exit. It would be nice to try to create a strategy based on my trading history, and see if AI would be able to "see" some base rules that would be possible to made into a strategy
Rename
That's exactly what out TradeHistory Strategy type is. You'll see it when you create a New Strategy.
Wow, I haven't noticed that before but cool. Very cool!
Tried with IBKR. Downloaded activity report as CSV file as instructed, but backtesting doesn't make any trades. I have 10+ trades from last 2 weeks with ES, (ESH25). Maybe too small number of trades or something else? Might try with bigger list of trades later.
Probably you’ll need to search and replace the futures symbol in the csv file to match the one in your WL data. e.g. replace ESH5 with ESH25.
Replacing "ESH5" with "ESH25" did not work. Also tried to delete everything but actual trades from CSV file, and that didn't help either.
Also I think my original question was misunderstood. Looks like trade history tool does not create algorithm based on my trading history, but merely "backtests" my trades so I can observe all the fancy statistics.
Also I think my original question was misunderstood. Looks like trade history tool does not create algorithm based on my trading history, but merely "backtests" my trades so I can observe all the fancy statistics.
Please post an example of a couple records from the csv file.
Use your best trades :)
Use your best trades :)
Here is few winning only trades
Trades,Header,DataDiscriminator,Asset Category,Currency,Symbol,Date/Time,Quantity,T. Price,C. Price,Notional Value,Comm/Fee,Basis,Realized P/L,MTM P/L,Code
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 12:46:07",-4,5740.5,5746.25,1148100,-9,-1148091,0,-1150,O
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 12:47:10",4,5733.5,5746.25,-1146700,-9,1148091,1382,2550,C
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 12:55:01",4,5737,5746.25,-1147400,-9,1147409,0,1850,O
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 12:55:43",-4,5740.75,5746.25,1148150,-9,-1147409,732,-1100,C
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 13:17:36",4,5752.75,5746.25,-1150550,-9,1150559,0,-1300,O
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 13:17:40",4,5753.25,5746.25,-1150650,-9,1150659,0,-1400,O
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 13:17:43",4,5753.25,5746.25,-1150650,-9,1150659,0,-1400,O
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 13:17:48",4,5753.25,5746.25,-1150650,-9,1150659,0,-1400,O
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 13:18:50",-4,5756.5,5746.25,1151300,-9,-1150559,732,2050,C
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 13:19:03",-4,5757.75,5746.25,1151550,-9,-1150659,882,2300,C
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 13:19:04",-4,5757.25,5746.25,1151450,-9,-1150659,782,2200,C
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 13:19:11",-4,5757,5746.25,1151400,-9,-1150659,732,2150,C
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 13:51:01",4,5737.25,5746.25,-1147450,-9,1147459,0,1800,O
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 13:51:48",-4,5739.75,5746.25,1147950,-9,-1147459,482,-1300,C
Trades,Header,DataDiscriminator,Asset Category,Currency,Symbol,Date/Time,Quantity,T. Price,C. Price,Notional Value,Comm/Fee,Basis,Realized P/L,MTM P/L,Code
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 12:46:07",-4,5740.5,5746.25,1148100,-9,-1148091,0,-1150,O
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 12:47:10",4,5733.5,5746.25,-1146700,-9,1148091,1382,2550,C
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 12:55:01",4,5737,5746.25,-1147400,-9,1147409,0,1850,O
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 12:55:43",-4,5740.75,5746.25,1148150,-9,-1147409,732,-1100,C
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 13:17:36",4,5752.75,5746.25,-1150550,-9,1150559,0,-1300,O
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 13:17:40",4,5753.25,5746.25,-1150650,-9,1150659,0,-1400,O
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 13:17:43",4,5753.25,5746.25,-1150650,-9,1150659,0,-1400,O
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 13:17:48",4,5753.25,5746.25,-1150650,-9,1150659,0,-1400,O
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 13:18:50",-4,5756.5,5746.25,1151300,-9,-1150559,732,2050,C
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 13:19:03",-4,5757.75,5746.25,1151550,-9,-1150659,882,2300,C
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 13:19:04",-4,5757.25,5746.25,1151450,-9,-1150659,782,2200,C
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 13:19:11",-4,5757,5746.25,1151400,-9,-1150659,732,2150,C
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 13:51:01",4,5737.25,5746.25,-1147450,-9,1147459,0,1800,O
Trades,Data,Order,Futures,USD,ESH25,"2025-03-06, 13:51:48",-4,5739.75,5746.25,1147950,-9,-1147459,482,-1300,C
Works fine for me. Where are you getting stuck? Are you using the IB Parser?
At the start of this chart, one of the two trades on the 12:56 bar (12:55:xx trades) was in the bar's range but the 4 trades after that were not even close - note the position of the circles at the trade price.
The trade times must be in your time zone, not the market's time zone, correct?
Probably we need to add an offset for time zones.
It doesn't really matter if it's in the range or not, WL will process it correctly - it'll just look wrong.
The trade times must be in your time zone, not the market's time zone, correct?
Probably we need to add an offset for time zones.
It doesn't really matter if it's in the range or not, WL will process it correctly - it'll just look wrong.
The offset was the answer. We're showing the chart in CST - the time zone of the CME futures, but the trade times in the file are in EST.
Yes, I am using IB parser and I don't get any trades on the left "imported trades" column.
I would understand if the file that I have saved as CSV wouldn't work, as there seems to be four different csv file formats in excel. But even the file that has been downloaded from IB database is not working. So I am out of ideas.. I have of course up to date version of WL
But good to know you found out that time zone problem.
I would understand if the file that I have saved as CSV wouldn't work, as there seems to be four different csv file formats in excel. But even the file that has been downloaded from IB database is not working. So I am out of ideas.. I have of course up to date version of WL
But good to know you found out that time zone problem.
Oh, noticed you have used .txt file format. I tried that too and now I get one buy and one sell order, but there is lot of errors on trades that don't work

I see the trade history parser for IB is not using the InvariantVulture when parsing the price field. It's a fix I'll make for the next release of the IB extension. Sorry about that!
Glitch, while you're there, can you add an hour offset custom setting in case the data doesn't use the market time zone, as in this case?
Re: file extension
txt or csv or xyz doesn't matter. This parser always treats the file as a text file with a comma separator.
Re: file extension
txt or csv or xyz doesn't matter. This parser always treats the file as a text file with a comma separator.
Thank you for your help! Nice to get this thing working eventually :)
Back to my original question:
Is it possible to evolve this tool so it would try to make an algorithm (one or multiple) based on actual trade history and try to get these same trades to happen based on that algorithm? 100% success rate would be if algo would get all the same trades to happen in backtest mode as in trade history.
As I believe this trade history tool only is showing the backtest results of my trade history. It is not creating algo based on those.
Back to my original question:
Is it possible to evolve this tool so it would try to make an algorithm (one or multiple) based on actual trade history and try to get these same trades to happen based on that algorithm? 100% success rate would be if algo would get all the same trades to happen in backtest mode as in trade history.
As I believe this trade history tool only is showing the backtest results of my trade history. It is not creating algo based on those.
Yes I can add an hour offset.
QUOTE:
txt or csv or xyz doesn't matter. This parser always treats the file as a text file with a comma separator.
For some reason trying with csv file ended up nothin. Not even those errors. Changing it to txt seems to have done - something.
QUOTE:No. That's far outside the scope of a TradeHistory Strategy.
Is it possible to evolve this tool so it would try to make an algorithm
Yah, I saw you had a different result with txt, but honestly, the file extension won't matter.
Your Response
Post
Edit Post
Login is required