Moving average data for trading algos

Hi,

I am using a machine learning platform for a trading algo project. Wondering if there is a platform that provides real time Moving Averages for currency pairs. I wrote a Python program to analyze ticks data (historical) but someone suggested that I include a least moving averages to improve the predicting power of the model. Thanks.

There’s no such thing as a REAL TIME MOVING AVERAGE

a Moving Average works like this
Let’s assume you are using an SMA (Simple Moving Average)
let’s assume you have selected SMA 50
Let’s assume that the SMA 50 is based on the Open Price

this means the indicator creates plot point (or Sample Point , if you will) at this current point in time

and… THE WAY THAT PLOT POINT IS CALCULATED and how the position is determined is like this

Step 1. it looks at the open prices of the previous 50 Candles
Step 2. it adds up the Prices
Step 3. it divides the total of the price by 50
Step 4. it obtains an AVERAGE RESULT

this result is set as the current Position for the indicator

so… since it DEPENDS on history and a predefined set of candles to be present
IT CANNOT BE IN REAL TIME EVER

this is what is known as a LAGGING INDICATOR

@Haitao

All Brokers ofer these indicators in their Trading Platform Software, Eg. MT4 CTrader etc…

MT4 Being your best option so you can program using MetaEditor Use with MQL4 Language.

Or MT5 with MQL5 Language

When I am ready to test my algo, I want to use these indicators from a trading platform, not from downloaded historical data. That was what I meant. The lagging indicators you pointed out are perfect for me. Thanks.

My programs are written in Python. Hope some brokers have their APIs for Python to have to access to their indicators. Thanks for the reply.

I would caution you that all profitable automated strategies start with a trading system that is profitable. I mention this because most stratagies involving moving averages fail in sideways and choppy markets resulting in an overall loss.

@Haitao

Have you looked HERE…>>

ZeroMQ…>> http://blog.darwinex.com/zeromq-interface-python-r-metatrader4/

Or This…>>

Actually my algo is totally based on price action data that will be learned by a TensorFlow network. The reason to use moving averages is that the same data pattern may have different implications for a rising MA indicator vs a declining one. The network will tell if it makes any difference for 30 minute time windows.

thanks for sharing this

No worries @Haitao

Do you Know the MetaQuotes Language ?

No, I do not know MetaQuotes. I was a Java guy for many years with recent experience in Python.

Then it would not take long for you to learn ,

The MetaEditor comes with the MT4 platform just open a demo account download it. A few weeks messing about with that and
you should be able to figure it out.

There are also java API’s

This is A Custom Moving Average with applied price action : the smaller thinner line close to price action changes from red to green.

Also a CAP channel indicator Thick yellow lines.

  • Modified Candle Indicator

You can download an indicator or EA and Modify in MetaEditor.

This is After Weekend—>>> Monday morning Big GAP !.

This is on demo account

From Java to Python, it was about a week’s discomfort with the syntax basically before getting up to speed. Python makes it a lot easier to do math stuff like linear algebra. Pretty nice.

@Haitao

Think if your Programming You would benefit.

Thanks @A1len Trader

I am studying how to code EAs with mql4 now. Its syntax does not look too different from Java. Some questions popped up - in order to write something that may make a profit, I need to be good at technical analysis (correct?). Any good resources for learning (for coders)? I have downloaded some classical books people recommend, but it will take a while to read through and understand it. Maybe I should get the low hanging fruits that are good enough for a start (for live trading)? Anyone who has similar experience to share? Thank you.

@Haitao

If your using Platforms like MT4 MT5 etc. your basically looking at the technical stuff so YES good at technical analysis would be advantage.
But people do use the Platforms Only to Execute there Orders into the market they may use other methods for there analysis like Old fashioned paper and pencil, Calculator.

Start Here … https://book.mql4.com/
(more like a subset of C language )
Have you read this also…MQL4 tutorial - Learn mql4 Expert Advisor programming

I think you should Create a system “Idea” that makes more profit than loss first with strict rules Risk/Reward ratio, Minimum loss_ protection… Once you have found that winning system Then do the tedious task of the programming it.

Don’t Make things Too complicated.

Regards. :alien:

I already got my hands dirty with mql4 now. MT4 uses an event driven model that runs your code when an EA starts and then on every tick or at any user defined time interval. It is a great tool. The only thing missing (for me) is the support for learning with a neural network. But I figured out a workaround. Will deal with that after getting access to certain indicators and creating my own indicator. Thanks for getting back to me.

There are 100’s if not 1000’s of indicators out there
i found this forum to be of use too …> Trading Systems @ Forex Factory

check out some of the indicators on the different threads some maybe useful.

I am very interested in your work Haitao i have thought about coding my own Army of EA’s

I have some programming experience but are concentrating on How the Whole Trading System works And how the banks Institutions move there money about first.
Im only into my 6th Month since i first started trading still a bit to learn.
Then once i am comfortable and have some solid system in place I will start Coding…

Good look keep us updated.

Hello A1len Trader,

Asides from EA’s there are Quant firms using deep learning to generate massive roi’s.

Last year my friend introduced me to an AI prop trading firm that trade all robots.
[Removed for Forums Policy violation]
They don’t solicit, so they use crowdfunding and perks to get around regulations.

When I first signed up for the first month I was afraid that I was being scammed, after the 2nd months returns I was at ease. While they try to provide thirty percent per month on a best effort basis, from January to now I have only had 2 months where the roi was under 30.
Their minimum of $5k is a step step to climb, but I just simply went to 4 friends who shared the risks and the profits with me.

Joe