Hi,
Is it possible to set MC back testing to just use the "high price" when buy, and use the "low price" when sell?
I am using Heikin Ashi bar, thus close and open are different from market quotes. The current back test with limit order in MC always uses the logic "buy at low" and "sell at high" on next bar open. This is useless in this case as most of the time you cannot get these prices. My goal is to back test in worst case. If a strategy performs well in worst case, it will have a very good chance to perform reasonably well in real-trading.
Thanks,
Jun
Worst case back testing - buy high, sell low [SOLVED]
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Worst case back testing - buy high, sell low
Hello Drjunzhao,
I also recommend you to print the order price generated by your script and OHLC prices of the bars in order to adjust the script to make it work as you expect.
There is no such option in MC.Is it possible to set MC back testing to just use the "high price" when buy, and use the "low price" when sell?
Please read how orders are executed in backtesting. In your case the Bar Magnifier is not available (for non-standard chart types), so you should pay attention to "Calculation on historical data. Regular mode (IOG disabled. Bar Magnifier disabled)" paragraph.I am using Heikin Ashi bar, thus close and open are different from market quotes. The current back test with limit order in MC always uses the logic "buy at low" and "sell at high" on next bar open. This is useless in this case as most of the time you cannot get these prices. My goal is to back test in worst case. If a strategy performs well in worst case, it will have a very good chance to perform reasonably well in real-trading.
I also recommend you to print the order price generated by your script and OHLC prices of the bars in order to adjust the script to make it work as you expect.
- Alex MultiCharts
- Posts: 194
- Joined: 09 Aug 2013
- Has thanked: 43 times
- Been thanked: 77 times
Re: Worst case back testing - buy high, sell low
Hello,Hello Drjunzhao,
There is no such option in MC.Is it possible to set MC back testing to just use the "high price" when buy, and use the "low price" when sell?
what Andrew meant is that there is no such an option, you can only execute it in the script.
If you want to buy at the highest price and sell at the lowest price, you can write as following:
buy next bar at high limit;
sellshort next bar at low limit;
You can also use the offset:
buy next bar at high+1 limit;
sellshort next bar at low-1 limit;
Re: Worst case back testing - buy high, sell low
**buy next bar at high limit;
**sellshort next bar at low limit;
Tried the above logic before and again today. MC always set to sell at high and buy at low, which is basically useless. I just need a way to "sell at low" and "buy at high" with or without using a script. Any other suggestion?
Thanks,
Jun
**sellshort next bar at low limit;
Tried the above logic before and again today. MC always set to sell at high and buy at low, which is basically useless. I just need a way to "sell at low" and "buy at high" with or without using a script. Any other suggestion?
Thanks,
Jun
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Worst case back testing - buy high, sell low [SOLVED]
We provided all required information for you to study how and why your script executes orders. Please read the articles and enable or disable some features in MC / adjust your script if needed to affect it.**buy next bar at high limit;
**sellshort next bar at low limit;
Tried the above logic before and again today. MC always set to sell at high and buy at low, which is basically useless. I just need a way to "sell at low" and "buy at high" with or without using a script. Any other suggestion?
As you can see on the picture below, it doesn't always sell and buy at highs/lows:
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Worst case back testing - buy high, sell low
Hi,
Can you please use 5 miniute Heikin Ashi bar, and let me what you see?
Thanks,