Codes

Theil_Sen Indicator Free for MetaTrader 4

This indicator draws a trend-line directly on a chart. It uses the Theil Sen Estimation method to calculate the slope of the trend-line. Theil–Sen estimation is a method for robustly fitting a line to sample points in the plane (simple linear regression) by choosing the median of the slopes of all

Ichimoku Kinko Hyo2 for MetaTrader 4

Ichimoku Kinko Hyo is an indicator that tracks the equilibrium of momentum and identify likely areas of support and resistance. The Ichimoku chart is composed of five (5) separate indicator lines. These lines work together to form the complete "Ichimoku picture"

Forum

Observation Concerning MetaQuotes

Hi. This post is not a rant nor a complaint; it is simply my observation. I think the MT4 and MT5 have surpassed the creators' expectation, as they never anticipated to get this number of customers from around the world. On the Metaquotes wiki page it shows that the company employs just over 50+

My new version of Ichimoku

Hi all. This is version 2: //+------------------------------------------------------------------+ //| Ichimoku2.mq4 | //| Copyright 2005-2014, ??MetaQuotes Software Corp??. | //| http://www.mql4.com | //+------------------------------------------------------------------+ #property copyright

Coincidence or cointegrated?

Hi. My EA trades multiple pairs simultaneously and I encountered a situation today I am trying to understand. Using a custom keltner channel indicator, I received a "BUY"(Long) trade signal from each of these pairs: EURUSD, EURJPY, EURCHF, CADJPY, CHFJPY, AUDJPY within seconds of each other, after

Need some collaboration and verification of this Ichimoku project

Hi. I am currently converting an indicator into a multipairs indicator, using the same technique I used on the Keltner Channel indicator. This indicator I am converting to multicurrency is the Ichimoku Kinko Hyo indicator. I think I am finished, I just want some folks to verify this on their demo

How to code an alternative to IndicatorCounted()?

Hi. I am converting a single currency indicator to a multipairs indicator and I would like to know the correct way to proceed. The indicator I am working on is a keltner channel, which works ok on the current symbol, however, I don't fully understand how to use IndicatorCounted() on a external

How to confirm breakout trades with volume in code?

Hi, Many professional traders recommend using volume to confirm breakouts. They say one can confirm a breakout when there is a spike in volume. I am looking to test this in an ea but can't translate it into code exactly. Now, how would one quantify a "spike" to put implement this in code? When price

how to reliably get current bid/ask?

As customary, many of us will use: SymbolInfoDouble ( NULL , SYMBOL_BID ); or SymbolInfoDouble ( NULL , SYMBOL_ASK ); or MarketInfo( NULL ,MODE_ASK); and those will work ok most of the time, however, for some of us they return 0 while implemented in the Strategy Tester. I am presenting here an

How to calculate 2 period EMA?

Hi. I am seeking some clarification on calculating the EMA(exponential moving average). Using the iMA function like so: double arr[ 3 ] = { 1.3051 , 1.3041 , 1.3047 }; //last three bars' closing prices array double ema1 = iMAOnArray2(arr, 2 , MODE_EMA , 0 ); // result is 1.30476667 double ema2 =

How to Calculate OrderSwap() Manually?

Hi. I am trying to derive the formula used by OrderSwap(). Is it like so: Orderswap = (MarketInfo(currentsymbol,MODE_TICKVALUE)/MarketInfo(currentsymbol,MODE_TICKSIZE))* MarketInfo(currentsymbol,MODE_POINT) * OrderLots();

How to Calculate Swap?

Hi. This post is a continuation, of sorts, to the thread started here: https://www.mql5.com/en/forum/218952 . It was titled "Swap Calculation issues..." by BoredMember but the thread was hijacked by the "rules", so many of us never got to see a solution. I am approaching the issue in a different