Hi,
I have searched the forum for hints in the use of SetContext but I'm not sure this will accomplish what I need. I have a strategy and a list of symbols (ETFs) that I execute at the end of day for trading signals. I would like to use the same strategy to evaluate a few indices like ^FTSE .... without creating a custom strategy for a single index and using SetContext. Is this possible??
Thanks
Size:
Color:
Hi,
There may be different approaches which ultimately depend on what you mean exactly by "evaluate". Please clarify.
Size:
Color:
Sure,
Each strategy when run, executes versus a dataset, or a specific symbol.... and yields buys/sells based on strategy code.
I have a dataset with ETFs (QQQ,SPY, IWM, DIA), and it works as expected.
I'd like the strategy to also execute with indices like ^FTSE (yahoo data) and just add that to the ETF dataset but there are no buy/sell alerts.
And I created a simple strategy to buy at market and sell at close to ensure that my code was not the reason there were no buy/sell signals for ^FTSE.
I know that some of the strategy code is being evaluated because I see candlestick data, and I see sell targets in the charts below the candlesticks but I'm not seeing any buy/sells.
Size:
Color:
^FTSE is an index priced above 6000 (at this time). Depending on position sizing settings, it's likely that FTSE trades may be rejected due to not enough cash. For example, with Raw Profit $5000 per trade or 10% equity on a $100K portfolio.
Is this the case?
Size:
Color:
Ive updated the paper account balance to $1,000,000,000,
however when i look at the performance analyzer results it says the position limit is $5000.
I can't find any settings for this in any of the backtest settings or portfolio settings .... but I think this may be part of the problem.
Size:
Color:
There's a Position Size dropdown box. It's on the left, on top of the DataSets tree.
Size:
Color:
Yes, just found it.
And changed to fixed number or shares (10)..... Still no buy/sell signals (indicated) with ^FTSE over 1 yr backtest.
However as I mentioned in the first post ... the bars are being annotated with a target price ......
And that Annotate Bar "code" is within the positions loop that tests for exits ......
CODE:
Please log in to see this code.
Very strange indeed .... so some of the code is being exercised because this annotation code would not be reached unless there are valid positions
Size:
Color:
Fixed .........
Thanks for your patience Eugene
Size:
Color:
Good to know.
Size:
Color: