Roffild's library - page 11

 
That's how I tried to do it, through print and output to a file. Neither of these just worked for me. That's weird. I'll have to learn how to debug.
 
canonier:

I'm crying bloody tears!

One line at a time trying to write function code.

What happened:

The value of x is returned correctly! Result is 251920

What was added:

The value of x returns incorrectly! Result is 3.211426697968103e-322

Tried adding-removing a string several times! I just read the file with the added string! It does not affect the calculation of x in any way! The pandas library is imported.

Why is the system behaving like this? Where to look for the problem?

Thank you! )

Try using a different name instead of x.
 
Dmitriy Skub:
Try using another name instead of x.

It didn't work.

0.0 is insane! ))

 
This code will output variable values when the console is activated:
def getDouble(self, magic: int, value: float, array: tuple) -> tuple or list:
    print("array = ", array)
    x = array[2] + array[1]
    df = pd.read_csv("RTSSplice.csv", usecols=['Low', 'Open', 'Close', 'High', 'Volume', 'Indicator1', 'Indicator2', 'Indicator3', 'Indicator4', 'Indicator5', 'Indicator6', 'Indicator7'], encoding='utf-16')
    print("x = ", x)
    return [x]

Probably an error in the MQL code, which sends the wrong data togetDouble(). Without all the source code it's impossible to figure it out.

 
Utils.py- functions for handling the MT5 report and configuration
Roffild/RoffildLibrary
Roffild/RoffildLibrary
  • Roffild
  • github.com
center line:
 

Thank you very much to the author for his work! From what is on the web, probably the most convenient way to call Python from mql5.

But my library doesn't load with error 193:

Cannot load 'E:\Program Files\Alpari MT5\MQL5\Libraries\Roffild\PythonDLL\x64\Release\PythonDLL.dll' [193]

Cannot call 'pyInitialize', 'Roffild\PythonDLL\x64\Release\PythonDLL.dll' is not loaded

Unresolved import function call


I open the terminal with the /portable flag and it works from my folder. Path to python3.dll is specified: PythonHome = "C:\\Users\\User\\\AppData\\\Local\\Programs\\Python\\\Python37-32\". And I tried specifying Anaconda, which is separate: PythonHome = "E:\\ProgramData\\\Anaconda3\".

The system is 64x, Windows 10, the terminal is also 64. I also ran it with admin rights, no change.

 
Kristian Kafarov:

I open the terminal with the /portable flag and it works from its own folder. The path to python3.dll is specified: PythonHome = "C:\\Users\\\User\\\AppData\\\Local\\Programs\\Python\\\Python37-32\\". And I tried specifying Anaconda, which is separate: PythonHome = "E:\\ProgramData\\\Anaconda3\".

The system is 64x, Windows 10, the terminal is also 64. Run it with admin rights too, no change.

64 bits are incompatible with 32 bits. Judging by "Python37-32" it's 32 bits. Maybe I downloaded Anaconda for 32 bits too. Except why? 64 bit try it.

 
Roffild:

64 bits are incompatible with 32 bits. Judging by "Python37-32" it's 32 bits. Maybe I downloaded Anaconda for 32 bits too... Except why? 64 bit try it.

Right, thanks, now it's booted!

 

Update:

MetaTrader 5 Agents & AWS EC2 and aws_ubuntu_user_data.sh

MLPDataFile can now be converted to Pandas and Numpy.

MetaTrader 5 Агенты & AWS EC2 (VPS/VDS) для Forex, CFD и Futures
MetaTrader 5 Агенты & AWS EC2 (VPS/VDS) для Forex, CFD и Futures
  • roffild.com
Использование MetaTrader 5 (MT5) Agents на серверах Амазона VPS/VDS. Это отличный вариант проверки торговой стратегии для валютных и биржевых рынков Forex, CFD и Futures. MetaTrader 4 (MT4) не имеет Агентов тестирования. Отличие от использования облака Агентов: Фиксированная цена за час и фиксированное количество ядер процессора. Возможность...
Reason: