Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
Aaron and welcome in this new video in this video, we're going to send orders from Python to MetaTrader
five.
So first, we will explain a little bit our function and how it's work.
And then we are going to see in the Ministry of I devised the order passed by Python.
So this function have two necessary parameters.
The symbol, the volume and two no necessary parameters.
So by which is equal to buy or sell depending of the state of the position that you want to open or
close.
And if the position is no offer position, if you want to close a position and if it's equal to none,
it means that you want to open the position.
So with this function, we can open bay position close by position, open a short position and close
this shot position.
So first, we need to initialize the bond between Python and MetaTrader.
We need to get the feeling of the assets, so it is just a moment.
But depending of each asset.
So we will need to import it and not to put static finning, but then we take the ask price, the big
price, the point and the deviation.
Now we need to split our function in different case.
So the first open a trend that if your position is equal to none, which means that we want to open
a trade.
So if you want to open by order, we need to take the title trade as border type volume.
And we need to set up stop loss and take profit.
Then we need to take the ask price to open a buy contract.
If you want to open a sell contract, it's exactly the same, but with opposite value.
Then you have to put that in a request for MetaTrader five.
And we keep in mind the results to see if there is an error, for example, or to see if the market
is close or anything else.
Then if you want to close a trade, you need to put the opposite order.
For example, if I went to close by order, I need to put the order type sell and a bit presque.
So if I want to close a senator, I need to put the order type by and the exports.
We put it in a request, MetaTrader.
And we keep in mind the results.
Then we return just the result because all the computation and the order are passed by MetaTrader five
directly.
So now let's see how its work in MetaTrader five.
So, for example, if I want to use this function.
I can pass a napkin by contracts using Python.
So we need a symbol.
I choose the Euro USD
and I want a volume of zero point zero one.
And as we can see directly, the contract out in the Middle East for the five platform.
So if I want to close,
I need to specify
the name, the volume and the position, which is this number.
So.
And it is exactly the same thing.
If you want to work with sell contract, but you need to specify by equal force.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.