Rewrite MQL 4 to MQL 5 Script errors

 

Rewrite MQL4 to MQL 5 Script errors

Need help!

Much appreciated in Advance.

'PlotIndexSetInteger' - no one of the overloads can be applied to the function call

'PlotIndexSetInteger' - no one of the overloads can be applied to the function call

'PlotIndexSetInteger' - no one of the overloads can be applied to the function call

'PlotIndexSetInteger' - no one of the overloads can be applied to the function call

'PlotIndexSetInteger' - no one of the overloads can be applied to the function call

'counted_bars' - constant cannot be modified 125 7

'lastbar' - constant cannot be modified 127 4

conversion possible loss of data 146 11

'iBands' - wrong parameters count 156 14

'iBands' - wrong parameters count 157 14

'high' - undeclared identifier 169 11

'low' - undeclared identifier 169 32

'open' - undeclared identifier 169 48

'close' - undeclared identifier 169 58

'High' - undeclared identifier 173 11

'Low' - undeclared identifier 173 30

'Open' - undeclared identifier 173 48

'Close' - undeclared identifier 173 58

'Low' - undeclared identifier 191 30

'High' - undeclared identifier 195 29

No indicator plot defined for indicator 1 1

'SetIndexStyle' - function is not defined 50 4

'SetIndexStyle' - function is not defined 51 4

'SetIndexStyle' - function is not defined 52 4

'SetIndexArrow' - function is not defined 53 4

'SetIndexArrow' - function is not defined 54 4

'SetIndexEmptyValue' - function is not defined 59 4

'SetIndexEmptyValue' - function is not defined 60 4

'SetIndexEmptyValue' - function is not defined 61 4

implicit conversion from 'number' to 'string' 64 35

'IndicatorShortName' - function is not defined 64 4

'iBarShift' - function is not defined 255 26

No indicator plot defined for indicator 1 1

'Slippage' - constant cannot be modified 42 7

'Time' - undeclared identifier 121 18

'MODE_MAIN' - undeclared identifier 126 68

'iStochastic' - wrong parameters count 126 20

'iStochastic' - wrong parameters count 127 20

'MODE_SIGNAL' - undeclared identifier 128 67

'iStochastic' - wrong parameters count 128 19

'iLow' - function is not defined 161 71

'iHigh' - function is not defined 161 103

'MODE_MAIN' - undeclared identifier 197 72

'iStochastic' - wrong parameters count 197 23

'iStochastic' - wrong parameters count 198 23

'iBands' - wrong parameters count 218 23

'MODE_LOWER' - undeclared identifier 219 74

'iBands' - wrong parameters count 219 23

'OP_BUY' - undeclared identifier 244 33

'OrderSend' - wrong parameters count 244 13

'MODE_MAIN' - undeclared identifier 253 72

'MODE_UPPER' - undeclared identifier 274 74

'iBands' - wrong parameters count 274 23

'MODE_LOWER' - undeclared identifier 275 74

'iBands' - wrong parameters count 275 23

'iHigh' - function is not defined 286 21

'iLow' - function is not defined 286 65

'iClose' - function is not defined 288 19

'iOpen' - function is not defined 288 53

'OP_SELL' - undeclared identifier 300 33

'OrderSend' - wrong parameters count 300 13

'IsDemo' - function is not defined 350 8

conversion possible loss of data 354 11

'SELECT_BY_POS' - undeclared identifier 366 22

'MODE_TRADES' - undeclared identifier 366 37

'OrderSelect' - wrong parameters count 366 7

'OrderSymbol' - function is not defined 367 10

implicit conversion from 'number' to 'string' 367 10

'OrderMagicNumber' - function is not defined 367 39

'OrderType' - function is not defined 367 76

'OP_BUY' - undeclared identifier 367 91

'SELECT_BY_POS' - undeclared identifier 380 22

'MODE_TRADES' - undeclared identifier 380 37

'OrderSelect' - wrong parameters count 380 7

'}' - not all control paths return a value 387 1

 

what kind of answer do you expect now???


Either you go through the list from top to bottom and fix one error after the other or you rewrite it from scratch or you ask the author of the script for an mql5 version.

 
7bit:

what kind of answer do you expect now???

i really believe that there is a difference between kindergarden and this forum.

but i havent found it yet ...

;-)

 

Thank you gentlemen,

I did fixed some of these errors from top to bottom.

Below is what I have tried.

1) HIGH[i] to PRICE_HIGH[i] error '[' - array required


2) 'iBands' - wrong parameters count

iBands(NULL, 0, 20, 2, 0, PRICE_CLOSE, MODE_UPPER, i);

to

iBands(NULL, 0, 20, 2, 0, PRICE_CLOSE, i);

3) 'iStochastic' - wrong parameters count

iStochastic(Symbol(), PERIOD_M15, 5, 3, 3, 0, 0, MODE_MAIN, 0);

to

iStochastic(NULL, 0, 5, 3, 3, MODE_SMA, STO_CLOSECLOSE, 0);

What about

'iOpen' - function is not defined == iOpen(string symbol,int tf, int shift)?

'iBarShift' - function is not defined == iBarShift(string symbol, int tf, datetime time, bool exact=false)?

 

maybe you find answers here

https://www.mql5.com/en/forum

 

Seems like you use the includes. Get the latest mt4timeseries.mqh here: https://www.mql5.com/en/forum/29

Stick that in your MQL5/Include folder.

That rewrite script you linked to had specific instructions to place include files into the Included folder. Did you do that?

 

Dear meikel and circlesquares,


Thank you very much for your help.


I am new to mql4, mql5 and no any computer program experience.

I think I can learn since you gentlemen here very helpful.


Much appreciated.

 
I am learning to program. I have this code in it only one error But I do not find it Can anyone help
 
Maher Snibr:
I am learning to program. I have this code in it only one error But I do not find it Can anyone help

Post your code using the </> code tool and write in english.

Reason: