WL 6.2
RE:
Strategy Name: ActiveTrader 2009-06 | Adaptive price channels by Riccardo Ronco
Author: Eugene
Created: 11/9/2009 5:38 AM
I would like to test this strategy against an index, and buy/sell an ETF or reverse ETF to simulate buy/sell and short/cover of the index. I have tried to modify the code using GetExternalSymbol and SetContext / RestoreContext, but I haven't found the right approach. I have the index and the ETF derivatives in the same Dataset folder.
Fundamentally, I don't understand how to keep the index trade triggers intact, while buying the ETF and not actually buying the index, and how the ETF positions are treated by the IsPositionActive logic in the original code. Finally, since this strategy uses Stops, if I try to change shorts into purchases of a reverse ETF using the stop price of the index channel, that's not going to work, since it's on the wrong side of the channel.
Am I approaching this the correct way? Do you think what I want to do can be accomplished by making some surgical changes to the posted code, or it a logic rewrite of the code flow? I would appreciate any guidance you can provide.
Size:
Color:
Size:
Color:
Thank you Eugene. This is helpful in terms of a design pattern for long/short ETF pairs. However, the example uses the ETF data to determine trading signals, not the underlying index. I want to use the index. Do I have to build a relationship between the index and the pair members?
Size:
Color:
QUOTE:
I would like to test this strategy against an index,
Please express your trading idea as simply and clearly as possible.
Size:
Color:
As an example, I would like to run the strategy on an index such as SPX and purchase and sell IVV (SPX tracking ETF) and SH (SPX inverse tracking ETF) when buy/sell or short/cover signals are generated by the strategy using the SPX index. Does this help clarify?
Size:
Color:
Size:
Color: