compile errors in MT4 for strategies made with custom template

Hi



Id need help with this one:
The strategies I made with default template seem to compile so far in MT4. My first custom template generated strategies however generated lots of "Double quotes are needed" errors when compiled in MT4. In stratetyquant the strategy seems to work fine.


MT4 (xm.comversion ) build 1170
Strategy Quant X build 116 and 117


regards


Timó





Attachments
engulfingCandlePlay_template.sqx
(3.18 KiB)
Strategy 251121.sqx
(103.47 KiB)
dailyEurUsd.mq4
(204.01 KiB)
  • Votes +1
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

TN
#1

Timo

12.01.2019 23:46

Task created

TN
#2

Timo

16.01.2019 23:26
Voted for this task.
TN
#3

Timo

31.01.2019 03:54
Any idea what might be causing this? I really liked the idea of custom templates but If I cannot compile them... :(
TN
#4

Timo

31.01.2019 03:55
Any idea what might be causing this? I really liked the idea of custom templates but If I cannot compile them... :(
MF
#5

Mark Fric

15.04.2019 14:04

Status changed from New to Fixed

Attachment engulfingCandlePlay_template2.sqx added

the problem is in your strategy. If you'll look at the Pseudo code of the strategy you attached you'll see:
if ((LongEntrySignal
and Not ShortEntrySignal)
and Not LongExitSignal)
{
// Action #1
Open Long order at Market;
Duplicate trades disabled
Profit target = at (HeikenAshiOpen(Main chart)[1] < HeikenAshiHigh(Main chart)[2]));

Move SL to BE = ((SMA(Main chart,20)[2] is falling for 2 bars at 3 bar ago)
and BollingerBands(Main chart,50, 2.1) Upper band is rising);
...

The problem is that value for Move SL to BE should be either in pips, or ATR or value of some indicator. Instead it is a condition that returns true/false.

There is a problem in StrategyQuant, it doesn't support usage of RandomValue placeholders yet.

We will implement it but in the meantime you can use the attached template - you can see that insteda of random values in a fixed action it uses RandomAction with some values fixed and some random.


Votes: +1

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please