Step-by-Step Guide: Writing a Moving Average Indicator for MetaTrader 5 with Python

Опубликовано: 07 Июль 2026
на канале: Orchard Forex
4,553
175

In the second episode of the video series on using Python with MetaTrader 5, the focus is on creating an indicator in Python that interacts with MetaTrader 5 as an API to a broker.

The first part of the video is about organizing the code from part 1 into a more coherent structure with initialization, looping, and de-initialization functions. The video details the process of refining the code, ensuring global variables are properly defined, and eliminating unnecessary code from previous iterations.

The Moving Average indicator is introduced as a simple and effective tool for analysis, with an explanation of how to calculate it using historical price data retrieved from MetaTrader.

To see the full series use this playlist
   • Use Python with Metatrader (Part 1)  

If you are looking for a broker and would like to help out the channel (we get commission and it costs you nothing) try https://orchardforex.com/broker
or for Australians who want more than the APRA restrictions allow try
https://orchardforex.com/ausbroker/

Join the discord group just to comment and get help on this code
https://orchardforex.com/discord