Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,310 --> 00:00:10,380
Aaron and welcome in this new video in this video, we're going to send orders from Python to MetaTrader
2
00:00:10,470 --> 00:00:10,920
five.
3
00:00:11,580 --> 00:00:16,710
So first, we will explain a little bit our function and how it's work.
4
00:00:16,890 --> 00:00:25,710
And then we are going to see in the Ministry of I devised the order passed by Python.
5
00:00:26,910 --> 00:00:32,160
So this function have two necessary parameters.
6
00:00:32,370 --> 00:00:38,880
The symbol, the volume and two no necessary parameters.
7
00:00:39,060 --> 00:00:47,550
So by which is equal to buy or sell depending of the state of the position that you want to open or
8
00:00:47,550 --> 00:00:47,910
close.
9
00:00:48,660 --> 00:00:59,130
And if the position is no offer position, if you want to close a position and if it's equal to none,
10
00:01:00,870 --> 00:01:03,420
it means that you want to open the position.
11
00:01:03,450 --> 00:01:12,270
So with this function, we can open bay position close by position, open a short position and close
12
00:01:12,290 --> 00:01:13,770
this shot position.
13
00:01:14,670 --> 00:01:19,680
So first, we need to initialize the bond between Python and MetaTrader.
14
00:01:20,340 --> 00:01:24,870
We need to get the feeling of the assets, so it is just a moment.
15
00:01:27,870 --> 00:01:31,590
But depending of each asset.
16
00:01:31,830 --> 00:01:44,580
So we will need to import it and not to put static finning, but then we take the ask price, the big
17
00:01:44,580 --> 00:01:47,730
price, the point and the deviation.
18
00:01:52,350 --> 00:01:58,440
Now we need to split our function in different case.
19
00:01:58,620 --> 00:02:07,080
So the first open a trend that if your position is equal to none, which means that we want to open
20
00:02:07,080 --> 00:02:07,440
a trade.
21
00:02:07,620 --> 00:02:18,960
So if you want to open by order, we need to take the title trade as border type volume.
22
00:02:19,680 --> 00:02:24,300
And we need to set up stop loss and take profit.
23
00:02:25,530 --> 00:02:31,650
Then we need to take the ask price to open a buy contract.
24
00:02:32,880 --> 00:02:38,540
If you want to open a sell contract, it's exactly the same, but with opposite value.
25
00:02:41,740 --> 00:02:46,570
Then you have to put that in a request for MetaTrader five.
26
00:02:47,170 --> 00:02:55,450
And we keep in mind the results to see if there is an error, for example, or to see if the market
27
00:02:55,450 --> 00:02:57,010
is close or anything else.
28
00:02:57,970 --> 00:03:06,400
Then if you want to close a trade, you need to put the opposite order.
29
00:03:06,430 --> 00:03:16,300
For example, if I went to close by order, I need to put the order type sell and a bit presque.
30
00:03:17,380 --> 00:03:27,160
So if I want to close a senator, I need to put the order type by and the exports.
31
00:03:27,850 --> 00:03:30,550
We put it in a request, MetaTrader.
32
00:03:31,420 --> 00:03:34,150
And we keep in mind the results.
33
00:03:34,450 --> 00:03:42,520
Then we return just the result because all the computation and the order are passed by MetaTrader five
34
00:03:42,520 --> 00:03:43,090
directly.
35
00:03:44,110 --> 00:03:49,240
So now let's see how its work in MetaTrader five.
36
00:03:52,250 --> 00:03:56,240
So, for example, if I want to use this function.
37
00:03:59,290 --> 00:04:06,280
I can pass a napkin by contracts using Python.
38
00:04:06,550 --> 00:04:07,990
So we need a symbol.
39
00:04:08,470 --> 00:04:10,600
I choose the Euro USD
40
00:04:13,180 --> 00:04:17,920
and I want a volume of zero point zero one.
41
00:04:25,100 --> 00:04:32,810
And as we can see directly, the contract out in the Middle East for the five platform.
42
00:04:33,380 --> 00:04:34,940
So if I want to close,
43
00:04:38,720 --> 00:04:40,010
I need to specify
44
00:04:45,860 --> 00:04:53,850
the name, the volume and the position, which is this number.
45
00:04:53,900 --> 00:04:54,290
So.
46
00:05:06,830 --> 00:05:09,320
And it is exactly the same thing.
47
00:05:09,860 --> 00:05:18,980
If you want to work with sell contract, but you need to specify by equal force.
4418
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.