Making a Python trading system for MT. - page 2

 
Sergey Chalyshev:

Where are the comments in the code? Do you think everyone here understands python and your ideas, comments would be superfluous?

What's with all the cracks""" Окно вÐомааав """ ?

What library import tkinter, where the description of its functions (methods)?

This is a utf-8 encoding. Change the extension to .py, open the file in a Python editor and everything will read fine. Or change the encoding in the program you're reading in.

Sorry, but you will have to learn Python yourself.) All the materials are available on the Internet. I'm not ready to rewrite them.

 
Yuriy Asaulenko:

This is utf-8 encoding. Change the extension to .py, open the file in a Python editor and it should read fine. Or change the encoding in the program you are reading in.

Sorry, but you will have to learn Python yourself.) All the materials are available on the Internet. I'm not ready to rewrite them.

It's definitely not UTF-8.

And that's even though I have Linux with the default UTF-8 setting

 
Konstantin Nikitin:

It is definitely not UTF-8.

And this despite the fact that I have Linux with the default UTF-8 setting

I read everything in utf-8 in Notepad++. I'll try to download it from the website.

ZS When downloading from the website, everything is OK too. Notepad++ says utf-8. I don't see the problem.(

 
Yuriy Asaulenko:

I read everything in utf-8 in Notepad++. I'll try to download it from the website.

ZS When uploading from the website, it's OK too. Notepad++ says utf-8. I don't see the problem.(

In Notepad it's fine:

# -*- coding: utf-8 -*-
"""
Created on Mon Jun  4 21:27:11 2018

@author: YUBA
"""

import tkinter
""" import math """

Win=tkinter.Tk()
Win.title("TS Python")
Win.geometry('300x250')

label_w=tkinter.Label(Win, text='Send Data')
label_w.place(x=0,y=140)

""" Окно вывода """

txt=tkinter.Text(Win,width=30,height=5)
"""txt.place(x=10,y=10) """
txt.pack()
txt.insert(1.0,'Окно вывода')

""" Окно ввода """
entry_w=tkinter.Entry(Win)
entry_w.place(x=60,y=140)

""" Кнопки """
btn_start=tkinter.Button(Win, text='Start')
btn_start.bind('<Button-1>',lambda event: Start()                                           )
btn_start.place(x=10,y=100)

btn_clean=tkinter.Button(Win, text='Clear')
btn_clean.bind('<Button-1>', lambda event: Clear())
btn_clean.place(x=60,y=100)

btn_stop=tkinter.Button(Win, text='Stop')
btn_stop.bind('<Button-1>', lambda event: Stop())
btn_stop.place(x=110,y=100)

btn_send=tkinter.Button(Win, text='Send')
btn_send.bind('<Button-1>', lambda event: Send())
btn_send.place(x=10,y=170)

def Start():
    a=0
    
def Clear():
    a=0
    
def Send():
    a=0
    
def Stop():
    a=0
    
Win.mainloop()
 
Yuriy Asaulenko:

Sorry, but you'll have to learn Python on your own.) All the materials are on the internet. I'm not ready to rewrite them.

Where are the comments in the code? Do you think everyone here understands python and your ideas, comments will be redundant?

What is the import tkinter library, where is the description of its functions (methods)?

We will learn python, no problem,

tkinter as I understand it does not belong to python, it is an external library,

no need to rewrite, provide links.


 
Sergey Chalyshev:

python is not a problem,

tkinter as I understand it doesn't belong to python, it's an external library,

don't rewrite it, give me a link.

There are plenty of links on Google. For example -https://ru.wikipedia.org/wiki/Tkinter

tkinter is included in the basic package. You don't need to install it.

Tkinter — Википедия
  • ru.wikipedia.org
Библиотека предназначена для организации диалогов в программе с помощью оконного графического интерфейса (GUI). В составе библиотеки присутствуют общие графические компоненты: Рамка. Содержит в себе другие визуальные компоненты Этикетка. Показывает некоторый текст или графическое изображение Холст. Может использоваться для вывода графических...
 
Yuriy Asaulenko:

There's a whole load of it on Google. For example -https://ru.wikipedia.org/wiki/Tkinter

tkinter is included in the basic package. There is no need to install it.

No dirt, give one source you think is adequate.

Got it!


 
Yuriy Asaulenko:
Yes, but why Python?
Actually, Python interested me because it has a lot of libraries (modules), including those for Machine Learning (machine learning or MO), which is what I've been doing for the last year. However, I haven't worked with Python - I haven't written a line yet). Well, I've tried something abstract, but without specific goals.
However, in order to apply Python specifically to trading systems it is necessary, for a start, to debug its interaction both with TS and terminal.
I considercalling Pythonfunctions from MQL via DLL to be wrong - to call Python function this way, I must run an interpreter and use it to call the function - and this is a very long process for each call.
I have a different concept: TC is a full-fledged EXE application that stores all previous data and necessary history. So we only call function from already running application - time of call is minimal.
Some people say - write - that Python is very slow. This is not true. For most systems (even intraday) the performance of Python is more than enough, and we will see that later. As for HFT, we cannot compete with them at any speed - it's other money). And other spreads).

Something like this https://www.mql5.com/ru/forum/261479/page16#comment_8011085 do you want to create or e.g. bypass?)

Собираю команду для развития МО (Дерева решения/леса) применительно к трендовым стратегиям
Собираю команду для развития МО (Дерева решения/леса) применительно к трендовым стратегиям
  • 2018.07.07
  • www.mql5.com
Предлагаю сплотиться для решения задачи МО применительно к трендам, т.е...
 
Ivan Negreshniy:

Something like this https://www.mql5.com/ru/forum/261479/page16#comment_8011085 do you want to create or e.g. bypass?)

That's a different subject).

I don't put a team together. I walk on my own, do what I think is right and interesting, and make no commitments.

If anyone wants to go out with me, there's no objection and no commitment either.

 
Sergey Chalyshev:

give one source you think is adequate.

I haven't seen any docs on tkinter. It's all compiled on the internet piece by piece. Google to help.

I'm obviously not qualified to be a Python Guru.)