Dear Support,
I have a 20 symbols bouquet, I need to select 2 of these 20 symbols to buy, based upon a specific tech analysis that I put over each one of them, then I compare the results, I rank them and I proceed with the purchase on a hourly base.
What I need to do is to translate this approach in MC and automate the trades and the position management , which is your advice to build it?
Many Thanks
Portfolio Backtesting Issue
- Stan Bokov
- Posts: 963
- Joined: 18 Dec 2009
- Has thanked: 367 times
- Been thanked: 302 times
Re: Portfolio Backtesting Issue
This is sample code for ranking your symbols, and placing trades for x amount of money, dynamically calculated using BPV, with a couple of checks. If you want to buy only two, the you should add the appropriate condition.
regarding this:
Code: Select all
PortfolioEntriesPriority = //YOUR TECH ANALYSIS HERE _for example ( closeD(1) - openD(1) ) / openD(1);_
value1 = ( InitialCapital ) / ( close * bigpointvalue );
if Portfolio_InvestedCapital < YOUR AMOUNT then
if ( date <> date[1] ) then buy .5 * value1 contracts next bar market;
once cleardebug;
print(Portfolio_InvestedCapital)
If you are asking about portfolio trading capabilities in MultiCharts, automating this process for real trading is not currently possible. You can perform the trades manually after seeing the results, or request the portfolio trading feature in the PM. Portfolio trading is not really realistic until we complete the 64 bit infrastructure, because it's very memory intensive.What I need to do is to translate this approach in MC and automate the trades and the position management , which is your advice to build it?
Re: Portfolio Backtesting Issue
Thank you very much,
I was actually able to rank and buy items based upon a tech analysis.
How can I manage to compare price of Stock X with price of Stock Y in the same portfolio?
Best Regards
I was actually able to rank and buy items based upon a tech analysis.
How can I manage to compare price of Stock X with price of Stock Y in the same portfolio?
Best Regards
- Stan Bokov
- Posts: 963
- Joined: 18 Dec 2009
- Has thanked: 367 times
- Been thanked: 302 times
Re: Portfolio Backtesting Issue
You can add supporting instruments to each main instrument (up to 4 supporting instruments), and use data2, data3, data4, and data5 to compare them to your main symbol (data1). You can't compare the price of Stock X to more than 4 others right now.