Imported Easylanguage strategy does not funtion well in MC  [SOLVED]

Questions about MultiCharts and user contributed studies.
vincentsequoia
Posts: 5
Joined: 16 Dec 2013
Has thanked: 1 time
Been thanked: 2 times

Imported Easylanguage strategy does not funtion well in MC

Postby vincentsequoia » 16 Dec 2013

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?

User avatar
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

Postby Andrew MultiCharts » 17 Dec 2013

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.
  • 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.)
Please make sure all the above mentioned settings are configured correctly. You should know that if IOG and/or Bar Magnifier (Look-Inside-Bar in TS) are used, the results will not be the same.

vincentsequoia
Posts: 5
Joined: 16 Dec 2013
Has thanked: 1 time
Been thanked: 2 times

Re: Imported Easylanguage strategy does not funtion well in

Postby vincentsequoia » 17 Dec 2013

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?

User avatar
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

Postby Andrew MultiCharts » 18 Dec 2013

Please provide us with the following set of files demonstrating the issue, i'd be glad to study the case:
  1. The MC workspace to reproduce the situation.
  2. The TS workspace to reproduce the situation.
  3. Export of used symbol (without data) from QuoteManager in .qmd archive,
  4. The exported strategy script with all dependent functions that applied on the workspace.
  5. Specify the bar number, its date and time, where the problem starts.
Please send the files to support@multicharts.com

vincentsequoia
Posts: 5
Joined: 16 Dec 2013
Has thanked: 1 time
Been thanked: 2 times

Re: Imported Easylanguage strategy does not funtion well in

Postby vincentsequoia » 18 Dec 2013

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?

User avatar
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

Postby Andrew MultiCharts » 18 Dec 2013

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).
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.html
Oh, is MC compatible with TS 9.1?
Yes, it is.

vincentsequoia
Posts: 5
Joined: 16 Dec 2013
Has thanked: 1 time
Been thanked: 2 times

Re: Imported Easylanguage strategy does not funtion well in

Postby vincentsequoia » 19 Dec 2013

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

User avatar
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]

Postby Andrew MultiCharts » 20 Dec 2013

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.

vincentsequoia
Posts: 5
Joined: 16 Dec 2013
Has thanked: 1 time
Been thanked: 2 times

Re: Imported Easylanguage strategy does not funtion well in

Postby vincentsequoia » 20 Dec 2013

Andrew,

Thanks. I had to put the "or" conditions in parenthesis; it works now.


Return to “MultiCharts”