Tag Archives: Python

Trading patterns help needed to convert from MT4 to Python

Working on Trading Patterns

After accomplishing the latest set of charts to generate both a long and short term view on forex pairs, the next challenge is determine what is happening to them when they consolidate. It seem the financial pros use many type of trading patterns to determine potential pricing action. This enables traders to see if any currency pair will have a breakout moment to perfect time a market entry.

There are so many different patterns but I have identified the ones NicTrades uses most often. After reviewing the rationale behind them, it makes sense to test them out. As I am using JForex, it seems this pattern functionality is rather limiting in the platform. It is also not quite as advanced in other platforms including Metatrader 4. I even tried looking for coding samples in Python. Unless I use machine language for chart pattern recognition, the choices are somewhat limited. I am also finding to try machine learning at this point will only further delay the implementation of my automated trading. It will be a nice to do this project later in the near future but  I will not be able to do it right now.

Onto Metatrader 4 scripts  the forex trading platform

Being on Mac has its advantages but I will tell you it can limit youth certain software. Metatrader is one of them. You can attempt to run a ‘MacOS’ version through a Wine packaged version. The brokers out there do a poor job at this. I tried running the one from FXPro but it did not run. I did get a version running from XM but they seem to be an unreliable broker being based out of Cyprus. They also take European only customers as well. These were the only ones I tried so I will not further waste anymore time going down this path. Also, I still refuse to run anything on Windows as it is just seems to run like a dog. I even tried running Linux via a virtual machine but I still would rather put staples in my head.

Note that I did find 3 MQL4 scripts that prove to have all the trading patterns I would like to try.

This is where you could come in

Then I had this Eureka moment! Why not hire someone to translate these MQL4 scripts into Python 3?  It should be a problem to find people through this ;community’ since Metatrader/MT4 /MQL4 is super popular. It also involves simple math judging from the source code. There may be some wonky translation of charting code to something within a Python Matplotlib package. Up for a challenge? If so, get in touch with right away.

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Popular indicators from TA-Lib Python wrapper

Different analytical indicators

Popular indicators were introduced from 2 recent videos. These were from the TA-Lib package Python wrapper.  I further tested to see which indicators could be found useful. Although, I would give you a different answer from my recent analysis video where I demonstrated popular indicators Williams R% and Stochastic, you would think everything looks clean. This is just another way of saying they do not lag when they change direction at fast timeframes like Tick or 1 Minute. I really emphasized the importance of this in the videos.

Different results vs Dukascopy JForex

I went ahead to start analyzing the same indicator with exact timeframes using TA-Lib within Python. As compared from within Dukascopy JForex, It seems I got different results so I tested a complete pile of them. This included:

1. Stochastics was just to jumpy to work with any form of trend.

2. Beta was more consistent which did not move around as much.

3. Williams R was again to volatile (in short periods) moving between in upper and lower ranges

4. Linear Regression and Chaikin A/D Oscillator was the same effect as Williams R

The only ones that seem to work were the popular indicators which include:

1. Normalized ATR

2. SMA

3. Bollinger Bands

4. Rate of Change Percentage

As a result, I will stick these 4 above to find out the magical combination. There are others to pick from within TA-LIB but I find you want to keep the combination simple. This also is important to really understand how properly interpret the unpredictable indicators I list above.

Next steps and considerations

I need to show how to  properly implement these but it depends when there data stored eg. database vs flat file. It looks the simplest is to use CSV with multiple instrument access is less utilized on the computer hardware front. You can obviously understand hoq critical these decisions are for when using an interpreted scripting language like Python.

There will be lots more to report as I continue along. Do note I find working with Python is much more product than Java within Dukascopy Jforex API.

Package info https://github.com/mrjbq7/ta-lib

Williams % and Stochastics most reliable Matlab technical indicator

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Technical Analysis trading with TA-Lib with Python

How to use TA-Lib with Python for technical analysis trading

This video will highlight the need of using a hopeful reliable technical analysis indicator library. My video explains the history of how this library was built and used in other popular projects.

Correct technical analysis indicators 

I could go on and on about technical analysis but I do find it useful for timing your positions including entry and exit. In past videos on testing visually various technical indicators with JForex, you will clearly see why I use this process. For instance, I thought linear regression would be useful. By checking visually on charts, it clearly showed  clearly how this indicator was not right. It was too sensitive on potential market direction at low levels e.g. 1 minute timeframe.

Technical indicator lessons

Using the chosen indicators it clearly  showed how they are not as sensitive/noisy nor lagging. This was an important eureka moment.  It is unfortunate I spent too many weeks to figure this out. Logging your positions in full detail of the indicators results you want to use is very helpful.  This is a critical process you need to understand instead of guessing where your trading positions results will end up. Many retail traders will never to get to this point. As a result, it does help to have this point of view when testing your trading ideas.

Python faster to develop with 

Also, the difference between developing 100% in the JForex API is very time consuming. As you get more confident with Python. you will be able to bang out trading scripts much faster. You will n longer be bogged down by the limitation of a broker or their API. As hinted in my video, this is why I would prefer to have all the market and trading data in one central hub (eg. Redis or CSV).  Once again, i cover this in my video.

Here is one benefit of using Python for my own development!

I now have the ability to fully backtest with the backtrader Python package as opposed to what I did in the past.

Here are the links from the video

https://github.com/mrjbq7/ta-lib

https://mrjbq7.github.io/ta-lib/func_groups/momentum_indicators.html

Create powerful trading robots with JForex API

#1 goal in forex trading is not to lose money but profit is 2nd

 

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Gold Price Forecasting Using Python Machine Learning

Gold Price Prediction Using Python Machine Learning

This is a basic way to apply machine learning Python packages like SciKit Learn. As gold is now becoming the number 1 asset of interest, here is a way to analyze movements on various gold ETFs. This is nothing revolutionary but it gives you the high level on how to implement these type of analysis and forecasting on popular market assets of the time

Links here

http://quantlabs.net/blog/2018/01/gold-price-prediction-using-python-machine-learning/

 

Also, I have posted a crucial item on understanding the bid and ask spread. If you never get the fundamentals on this, you will pretty well be failing with no knowledge why. Knowing this will help my forex strategy analysis much more. I will be posting a new video on this pointing back to this article. Let me know if you are interested in this by responding.

Thanks Bryan

Gold Price Prediction Using Python Machine Learning

http://quantlabs.net/blog/2018/01/bitcoin-price-forecasting-using-monte-carlo-simulation-forex-analysis/

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Microsoft To Considers Adding Python as an Official Scripting Language for Excel

Microsoft Considers Adding Python as an Official Scripting Language to Excel

<< Test First Name >>,
Will this really file or will it get abandoned eventually?

 

Here are some Facebook post comments on this:

 

Now a fuc*in news

 

Why would you use Python in Excel, when you can use just Python  😀 The mind boggles sometimes.

 

Refer to the links here

 

http://quantlabs.net/blog/2017/12/microsoft-considers-adding-python-as-an-official-scripting-language-to-excel/

 

Here is the video 

See the links above
Thanks Bryan
NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Microsoft Considers Adding Python as an Official Scripting Language to Excel

 

Will this really file or will it get abandoned eventually?

https://www.bleepingcomputer.com/news/microsoft/microsoft-considers-adding-python-as-an-official-scripting-language-to-excel/

https://forms.office.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbR7tUuWqOwSJFpBE5ZLhdkgtUMkhZWlkxRjhDRklXSjNTVkNSWkE2WlNQMS4u

https://www.forbes.com/sites/danwoods/2015/01/27/microsofts-revolution-analytics-acquisition-is-the-wrong-way-to-embrace-r/#5ccc945e75e1

http://ironpython.net

 

https://www.python.org/downloads/

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Chat with a trader: Python Quants

If you want to start or continue working with Python as a group. I would recommend start looking into this group who set the standard somewhat for Python algo traders. There are others who seem to set the stand but they are not doing well in terms of trading performance. This same standard group keep cutting back on their features. If you want to something more standardized, check this group out.
Listen to this interview now
As said, I have just raised the price for all my courses which will be featured in a completely different way. More news will be coming on that in a few days with new marketing videos to showcase this product.

 

Thanks for reading,

Bryan

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Project Jupyter and Interactive Computing with Python C++

Project Jupyter and Interactive Computing with Python C++

This is the future stack for most trading technologies

https://blog.jupyter.org/interactive-workflows-for-c-with-jupyter-fe9b54227d92

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Intro Deep Learning with Python, TensorFlow and Keras

Intro Deep Learning with Python, TensorFlow and Keras

This looks like the best page to learn how to apply math to machine learning

https://sandipanweb.wordpress.com/2017/11/25/some-deep-learning-with-python-tensorflow-and-keras/amp/

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Failing hard and often with R and Python packages you don’t know

Failing hard and often with R and Python packages you don’t know

My summary: hahahahahaha as you have been warned

 

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!