Metatrader Finding the last trade bar

Posted on March 8th, 2017

There are times when your strategy would like to see if a trade was taken within some period. This could be in order to limit your trades, or because you signal generation might not be as fine tuned, and you only want to take the initial trade, or to split up your trades into smaller traders every few minutes.

MQL Custom Indicator Hammer Candlestick Pattern

Posted on January 13th, 2016


Price Action is one of the most useful strategies you can add to your trading arsenal.  I always recommend starting out visually detecting price action patterns, but once you understand how simple they are, you can easily start to code your own price action indicators.  Most of the candlestick patterns simply compare open, close, high and low price points of the current, or set of candles.  We’ll show you how to code a simple indicator to detect one of the most useful candlestick patterns.


MQL4 Custom Indicator Tutorial 1

Posted on December 9th, 2015


Getting started in custom indicators is a great starting point for your mql development.  I’m going to start these tutorials in mql4 and make mirror tutorials for mql5.  But since mql4 is the most widely used and most brokers might not support mql5 yet we’re going to start there.


Getting Started

If your version of metatrader is on mql4 when you create your new custom indicator in metaeditor you will already have a template setup for you.  If you have mql5 you can simply create the indicator , delete the template and insert your own mql4 template.  Here is the bare bones functions we need in any mql4 indicator. I’ve commented most of the code below but lets go over it in some detail as this is the most important step to understanding how metatrader functions.