Dear coders,
Could you pls help me convert the attached indicator into an MTF one?
Thank you in advance!
Haruteri
Could you pls help me convert the attached indicator into an MTF one?
Thank you in advance!
Haruteri
Attached File(s)
I will code your pivot EAs for no charge 28 replies
I will code your scalping EAs for no charge 163 replies
Oanda MT4 - Indicators and EAs not showing 2 replies
EAs and indicators relating to moutaki... 22 replies
InterbankFX has loaded its MT4 platform with custom EAs, indicators and scripts 1 reply
//+------------------------------------------------------------------+
//| EMA vs LWMA |
//| Copyright 2024, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
//--- input parameters
input int EMA_Period = 5;
input int LWMA_Period = 19;
//--- indicator buffers
double EMA_Buffer[];
double LWMA_Buffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//--- indicator buffers mapping
SetIndexBuffer(0, EMA_Buffer);
SetIndexBuffer(1, LWMA_Buffer);
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
//--- calculate EMA and LWMA
for(int i = 0; i < rates_total; i++)
{
EMA_Buffer[i] = iMA(NULL, 0, EMA_Period, 0, MODE_EMA, PRICE_CLOSE);
LWMA_Buffer[i] = iMA(NULL, 0, LWMA_Period, 0, MODE_LWMA, PRICE_CLOSE);
}
//--- determine trend and display message
string trend_message = "daily is ";
if (rates_total > MathMax(EMA_Period, LWMA_Period) && EMA_Buffer[rates_total-1] > LWMA_Buffer[rates_total-1])
trend_message += "bull";
else
trend_message += "bear";
Comment(trend_message);
return(rates_total);
}
//+------------------------------------------------------------------+ EMA_Buffer[i] = iMA(NULL, 0, EMA_Period, 0, MODE_EMA, PRICE_CLOSE );
LWMA_Buffer[i] = iMA(NULL, 0, LWMA_Period, 0, MODE_LWMA, PRICE_CLOSE); LWMA_Buffer[i] = iMA(NULL, 0, PERIOD_D1, 0, MODE_LWMA, PRICE_CLOSE);
EMA_Buffer[i] = iMA(NULL, 0, PERIOD_D1, 0, MODE_EMA, PRICE_CLOSE); Disliked{quote} {quote} Latest is https://www.forexfactory.com/thread/...4#post14755744 {quote} There are up to 20 daily vlines per instance, one vline per day is drawn per vline selected. If 1 vline is selected then there will be roughly the number of days on the chart in vline objects, and a handful of labels. How would I replicate the issue you have encountered? {quote} The labels are updated on all chart changes, running in the tester in visual mode may have some slow down, I haven't noticed it as significant, not showing labels...Ignored
Disliked//+------------------------------------------------------------------+ //| EMA vs LWMA | //| Copyright 2024, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Blue #property indicator_color2 Red //--- input parameters input int EMA_Period = 5; input int LWMA_Period = 19; //--- indicator buffers double EMA_Buffer[]; double LWMA_Buffer[]; //+------------------------------------------------------------------+...Ignored
Disliked{quote} You need to initialize the moving averages first in OnInit(), then use CopyBuffer to get the indicator values (and potentially set your buffers) in OnCalculate()Ignored
Dislikedhello, can anyone help make this simple indicator? Edit : Also add display / sound alert *sorry for my bad english {image}Ignored
DislikedHello. Dear BestTraderEv, please help me translate the indicator for MT5. Thank you. {file} {image}Ignored
Disliked{quote} any master coder interested to code this indicator please.thanksIgnored
Disliked{quote} Volume_Matcher - shows volume - colored by bull/bear candle - option to match 2 completed volumes - alert {image} {file}Ignored
Disliked{quote} Total waste of time and effort. Just use one of these: {file} {file}Ignored
Disliked{quote} if you don't know how to use it than everything is useless in this world bro.thanksIgnored
Disliked{quote} Dear BestTraderEv!!! The Volumes indicators in the basement have errors. Necessary: 1. Linking to the volumes on the chart. 2. Color matching - green (red) bar - green (red) volume column. This is a good information indicator. And the work is important because with this indicator the MT-5 trading platform rises to the level TradingView, eSignal. A lot of people will thank you. Please rewrite for MT5 as simple as possible - no need to switch up/down. There is no need to rush. Thank you. I apologize for the language. {image}Ignored
Disliked{quote} i don't know what you expect or consider this method or indicator ? Buy sell signal or money machine ? For me this is just one weapon ( i have a 100 weapons) potential zone /spot this is not buy buy sell signal for me trading is confluence , i take my trade buy-sell decision based on my own created strategy ptz which is mix or based on supply demand wyckoff smart money fibo malaysian snr ( in my way )sorry for my bad english.thanksIgnored
Disliked{quote} I can't check it on your instrument, because I don't have Future contracts on my platform. If you have futures contracts, you may have Real Volume. Try using Real Volume option. I will not code the on chart volumes for MT5, because I have no idea how to translate the volumes and plot them on prices... sorry. The formula provided in the MT4 version does not work properly on MT5. I ma using tick volumes and everything looks normal on my chart: {image} Here is a CFD for Futures instrument, but it only provides tick volumes: And everything looks...Ignored