Imported Easylanguage strategy does not funtion well in MC [SOLVED]
-
- Posts: 5
- Joined: 16 Dec 2013
- Has thanked: 1 time
- Been thanked: 2 times
Imported Easylanguage strategy does not funtion well in MC
I just imported from TS a strategy I wrote in Easylanguage; it works well in TS, but it performs VERY differently and unsuccessfully in MC. Is there a list of things that commonly have to be edited when importing a strategy (signal) in EasyLanguage from TS?
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Imported Easylanguage strategy does not funtion well in
Hello vincentsequoia,
If the code is compiled successfully in MC, it should be working fine.
There are multiple "variables" in comparison TS and MC (same) strategy performance results.
If the code is compiled successfully in MC, it should be working fine.
There are multiple "variables" in comparison TS and MC (same) strategy performance results.
- Data on charts should be the same (first bar on chart, last bar on chart, actual number of bars on chart, data source, symbol name, chart type, chart resolution, session settings, etc.)
- Signal script should be the same
- Strategy settings should be the same (Intrabar Order Generation mode, Bar Magnifier status, backtesting assumptions, trade size, commissions, slippage, etc.)
-
- Posts: 5
- Joined: 16 Dec 2013
- Has thanked: 1 time
- Been thanked: 2 times
Re: Imported Easylanguage strategy does not funtion well in
Andrew,
Thanks for the info. I appreciate it. All good things to consider, but I checked and they do not seem to be applicable to my problems.
On TS I got about 9 trades; on MC I got 369 in the same time period.
Basically, on MC an entry is made as soon as my programed trading hours start, and when the trade exits, the next bar immediately enters again - a continuous enter and exit chain, ignoring every entry condition (except trading hours and at least one exit type).
I imported the strategy; I pasted and copied it on a new MC signal page; and finally I entered the code in its entirety, line by line, successfully compiling every few lines, on yet another MC signal page. All three attempts got the same chain of continuous entry and exit results.
Any ideas?
Thanks for the info. I appreciate it. All good things to consider, but I checked and they do not seem to be applicable to my problems.
On TS I got about 9 trades; on MC I got 369 in the same time period.
Basically, on MC an entry is made as soon as my programed trading hours start, and when the trade exits, the next bar immediately enters again - a continuous enter and exit chain, ignoring every entry condition (except trading hours and at least one exit type).
I imported the strategy; I pasted and copied it on a new MC signal page; and finally I entered the code in its entirety, line by line, successfully compiling every few lines, on yet another MC signal page. All three attempts got the same chain of continuous entry and exit results.
Any ideas?
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Imported Easylanguage strategy does not funtion well in
Please provide us with the following set of files demonstrating the issue, i'd be glad to study the case:
- The MC workspace to reproduce the situation.
- The TS workspace to reproduce the situation.
- Export of used symbol (without data) from QuoteManager in .qmd archive,
- The exported strategy script with all dependent functions that applied on the workspace.
- Specify the bar number, its date and time, where the problem starts.
-
- Posts: 5
- Joined: 16 Dec 2013
- Has thanked: 1 time
- Been thanked: 2 times
Re: Imported Easylanguage strategy does not funtion well in
Andrew,
Thanks for your reply and the offer. However, I'm not comfortable sharing my entire strategy.
I guess I have to build and test each component from scratch in MC. A bit disappointing. (I'm on a 30 day trial).
Oh, is MC compatible with TS 9.1?
Thanks for your reply and the offer. However, I'm not comfortable sharing my entire strategy.
I guess I have to build and test each component from scratch in MC. A bit disappointing. (I'm on a 30 day trial).
Oh, is MC compatible with TS 9.1?
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Imported Easylanguage strategy does not funtion well in
Please come to our live chat during working hours (6:30 am – 4:00 pm EST) to let our operators connect to your computer remotely in order to help you (we won't take anything from your PC without your permission, but we may need to opent he scripts both in MC and in TS to make sure they are identical): http://messenger.providesupport.com/mes ... pport.htmlThanks for your reply and the offer. However, I'm not comfortable sharing my entire strategy.
I guess I have to build and test each component from scratch in MC. A bit disappointing. (I'm on a 30 day trial).
Yes, it is.Oh, is MC compatible with TS 9.1?
-
- Posts: 5
- Joined: 16 Dec 2013
- Has thanked: 1 time
- Been thanked: 2 times
Re: Imported Easylanguage strategy does not funtion well in
Andrew,
Progress - I found the culprit! After rebuilding the code entirely from scratch in PL, the last thing I tried was the problem. I have some code that creates a trading hours condition. When I insert it into the rest of the coding it creates a continual chain of entries (as soon as one trade exits, it enters another trade, negating/overriding all other entry conditions).
Here is the applicable code portions...
Inputs: //Pacific Time
BeginTradeTime1 (000),
EndTradeTime1 (100),
BeginTradeTime2 (500),
EndTradeTime2 (900);
variables:
TradingHours1 (false),
TradingHours2 (false);
If Time >= BeginTradeTime1 and Time <= EndTradeTime1
then TradingHours1 = True
else TradingHours1 = false;
If Time >= BeginTradeTime2 and Time <= EndTradeTime2
then TradingHours2 = True
else TradingHours2 = false;
If (several entry conditions) and TradingHours1 or TradingHours2 then
Sellshort next bar at market;
Do you see anything that needs to be corrected?
Thanks again,
Vincent
Progress - I found the culprit! After rebuilding the code entirely from scratch in PL, the last thing I tried was the problem. I have some code that creates a trading hours condition. When I insert it into the rest of the coding it creates a continual chain of entries (as soon as one trade exits, it enters another trade, negating/overriding all other entry conditions).
Here is the applicable code portions...
Inputs: //Pacific Time
BeginTradeTime1 (000),
EndTradeTime1 (100),
BeginTradeTime2 (500),
EndTradeTime2 (900);
variables:
TradingHours1 (false),
TradingHours2 (false);
If Time >= BeginTradeTime1 and Time <= EndTradeTime1
then TradingHours1 = True
else TradingHours1 = false;
If Time >= BeginTradeTime2 and Time <= EndTradeTime2
then TradingHours2 = True
else TradingHours2 = false;
If (several entry conditions) and TradingHours1 or TradingHours2 then
Sellshort next bar at market;
Do you see anything that needs to be corrected?
Thanks again,
Vincent
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Imported Easylanguage strategy does not funtion well in [SOLVED]
Vincent,
As long as conditions for order generation are met, your code will generate orders and place them. If this is not what you want, please print order generation conditions from the script and adjust the code to work as expected.
As long as conditions for order generation are met, your code will generate orders and place them. If this is not what you want, please print order generation conditions from the script and adjust the code to work as expected.
-
- Posts: 5
- Joined: 16 Dec 2013
- Has thanked: 1 time
- Been thanked: 2 times
Re: Imported Easylanguage strategy does not funtion well in
Andrew,
Thanks. I had to put the "or" conditions in parenthesis; it works now.
Thanks. I had to put the "or" conditions in parenthesis; it works now.