getATR function undefined

Hi,

    Just downloaded SQ4 RC1, and generated strategies with ATR based SL and PT. If I tried to compile the generated MT5 MQL code, it shows that getATR function undefined.

======================== Generated Codes =========================
         // StopLoss & ProfitTarget
         sqSetSLPT(_ticket,
                      sqGetSLLevel("Current", ORDER_TYPE_SELL, 0, false, 2.8 * getATR(NULL,0,20,1)), // SL
                      sqGetPTLevel("Current", ORDER_TYPE_SELL, 0, false, 3.3 * getATR(NULL,0,25,1))); // PT


         // ExitAfterBars initialization
         sqSetExitAfterXBars(_ticket, 6);

========================Compilation Error Message ========================

      'getATR' - function not defined    Strategy 0.5849.mq5    315    80

      Please help fix this.

Thanks!
Attachments
No attachments
  • Votes 0
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

I
#1

Wincent Yeh

05.05.2018 06:44

Task created

TB
#2

Tomas Brynda

09.05.2018 08:39
Hi,

can you please attach some SQ4 strategy that outputs this faulty MQL code? The function getATR() has been removed some time ago, it should not be used in generated MQL code anymore.

Locally, I cannot reproduce the issue.


Thank you

Tomas


 

I
#3

Wincent Yeh

09.05.2018 14:12

Attachment Strategy 05849.mq5 added

Please see the attached Strategy_05849.mq5
g
#4

geektrader

09.05.2018 23:29
He is looking for the .sq4 file that created the faulty MQ5 code, not the MQ5 code itself. Can you provide the .sq4 file that outputs the wrong MQ5 code so that Mark can investigate?
I
#5

Wincent Yeh

10.05.2018 01:53

Attachment Strategy 089.sq4 added

Attachment Strategy 089.mq5 added

Please see the attached two files.
TB
#6

Tomas Brynda

10.05.2018 11:47

Status changed from New to Fixed

Thank you for attaching the files. The bug has been fixed

Votes: 0

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please