Making a Python trading system for MT. - page 8

 
Vitaly Muzichenko:

Enter so as to make a profit to the right of the current price)

I didn't ask how to enter.

Hint: I had a sell signal triggered 3 hours ago. Wrong?

 
Maxim Dmitrievsky:

quantopian.com has a tester if you are interested. And they also fund successful strategies

he's chiseling away at low liquidity on the russian market. If you have 100,000 roubles or 100,000 roubles, you can only make money on beer, maybe with fish.

And these are the kind of people who walk around the forum proudly calling themselves successful traders ))

 
TheXpert:

he's chiseling away at the low-liquidity russian market. If you get 100,000 rubles or 100,000 rubles, you will only make money on a beer, maybe a fish.

And these are the kind of people who walk around this forum proudly calling themselves successful traders ))

Andrei, I don't know if we'll earn more ... You are capable of much more than forex trading. Sorry if I'm interfering.

 

Let me remind readers of the content of the previous series.

The goal of the topic is not to create a trading system (TS), but to create a TS specifically in Python. Python is chosen because it has extensive data processing libraries, including machine learning, and it would be very good to use these libraries directly from the TS, instead of multiplying the system with various interlanguage interfaces. In addition, Python is an excellent simulation environment, not inferior in capabilities to the same MatLab, which ideally will allow to combine the simulation of the system and its runtime environment. I.e., the stage of transfer of the TS from the model to another programming language is completely excluded, and the model is directly used in the TS.

At the moment we have implemented: a strategy template, strategy tester, all of it tested on a simple strategy. All sources can be downloaded from the attachment in one of the previous posts. Besides, I made a model of TS on the basis of an old working strategy. The model is tested on futures SBRF-12.17 and SBRF-06.18.

Also tested today on futures SBRF-09.18. The results are similar to SBRF-06.18 and I think there is no point in presenting graphs.

Now about the future plans.

1) I would like to implement the system for real and virtual trades now. The virtual trade - is when the requests are not sent to the broker, and the opening-closing of the transactions is written to the log - in our case, the SQLite database table. Usually this stage takes about a month and is combined with the development of the system. Connection with the terminal at this stage is planned according to the scheme: terminal -> DLL -> SQLite database -> Python. The communication protocol is approximately similar to the file exchange.

2. The system is still raw. The old, taken as a basis, system was significantly changed, practically only the basic principles remain - I don't see the point of doing the same thing several times. So far, no manipulations have been made with the settings. In general, there is still a lot of sawing and sawing to do.

I would like to combine both of these stages, but at the moment I don't have such an opportunity - I don't have a free computer. And I would like to do both. I do not even want to, but I would like to. So far, my priorities have not been chosen.

In any case, there is a lot of work to be done, and I can't expect any new results in the near future.

 
I used to program in python a long time ago. it's an interesting topic, keep it up, I'm following it.
 

Honestly, this Python is annoying, along with its classes. Here's just a little snippet of one of the functions:

 def Condition(self,i,c=4):
        dt=0
        L1=not self.Sh and not self.Lo and self.Dev[i]> self.DevL
        if L1  and self.history[i][c] < self.Dev[i] - self.Fr[i]:
            self.Lo=True
            self.Pmin=self.history[i][c]
        elif L1 and self.history[i][c] > self.Dev[i] + self.Fr[i]:
           self. Sh=True
           self.Pmax=self.history[i][c]

Count how many times the word self is repeated in this little piece of code ?

And all the time and everywhere, in every line several times. This nonsense will be repeated constantly in all functions (methods) of any class.

 
Yuriy Asaulenko:

An idea came up to write a trading system in Python,

...

Why not in C++ or C#?

The funny thing is that it can even be written in MQL5, why this layer of slow creeping python?
 
Yuriy Zaytsev:

Why not in C++ or C#?

The funny thing is that it can even be written in MQL5, why this layer of slow creeping python?

In C++ and C# I already have it).

For the rest read either the first posts of the thread or 3-4 posts ago).

 
Yuriy Asaulenko:

In C++ and C# I already have).

For the rest read either the first posts of the thread, or 3-4 posts ago).

I think that most such systems are written because the author knows this or that tool well.

And by and large almost everything can be written in MQL5.

 
Yuriy Zaytsev:

I think that most of these systems are written because the author knows this or that tool well.

By and large, almost everything can be written in MQL5.

If you can write everything in MQL, you really don't need anything else.

I can't and I don't even want to write and go into details of algorithms that have already been written, practiced and available. I don't want to use them directly, instead of rewriting or adapting them to MQL. By the way, this is the main concept of OOP.

Reason: