Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Auto Trade based on difference line and not base chart
I have 2 charts - Chart 1 (10 yr treasuries) and Chart 2 (Ultra 10 year treasuries). I have a 3rd Chart which is a copy of Chart 1 and then have the Difference line indicator as the main graph (so the blue line u see is the actually Difference line)
I am trying to Backtest on this 3rd chart and want the trade values based off the Difference line but it always picks the base symbol from Chart 1 (i.e always calculates on the 10 yr treasuries).
So even though the trade logic works (i.e. signals are evaluated based on the Difference Line) and everything functions, my output, stats all are based on the base symbol which is 10 year treasuries. I want all the output and stats based on the Difference Line.
So P/L and other stats from the backtest should be based on the Difference line values and not the base symbol
As u can see the chart attached, the values are 103.xxx. Also you can see the popup when i click Replay/backtest, it says base it of the 10 year (TYA - CQG symbol). So even though the logic is right, it initiates a trade on the 10 year at the time of the signal and all values are based off the 10 year.. NOT the difference line
Any help appreciated
Can you help answer these questions from other members on NexusFi?
Also, the exchange may have a spread symbol, and you could trade it directly.
Are you wanting to enter at the Difference price in one of the Treasuries?
The signal from the Difference chart can only enter at Market in the symbol of the chart where the autotrader is active, and only at the price of that symbol at the time of the signal.
Entering at the Difference price would require placing a Limit or Stop entry order, and it would be in the Treasury symbol where the autotrader is active. And you'd need a way to cancel it if it didn't fill.
Also... and I dont know if this will help. Its been my experience on other platforms is that the execution takes place on chart1. (Unless otherwise specified)
The other thing is you might need to do is write the code to execute off the spread indicator.
I am not looking to auto trade but backtest. I can use the exchange spread and superimpose the outrights, use those as buy/sell criteria taking orders on the spread chart for back test but this is not accurate.
So I am trying to back test with the difference values for a more accurate backtest but as I wrote it’s not working as the buy/sell orders and stats are based on the base chart
If this is not clear then I can message u
Please see my comment above. Its super general but might be something in there.
As for the backtesting. Like I mentioned above you can plot 10 year the 2 year the spread on one chart. And write your code to execute on signals from the spread indicator.