Forum

iCustom not working

Hello everyone I can't get the call to iCustom to work. The called indicator is located in the \Indicators folder. It returns INVALID_HANDLE. I have also tried the path "\\Indicators\\Bollinger_bands_1b.ex5" and "Indicators\\Bollinger_bands_1b.ex5". The calling indicator program is in the Indicators

ENUM inputs in debugger doesn't work as expected

Hi everyone Please if someone can help me with this highly frustrating problem. I have a custom ENUM declared like so: enum MA_TYPE {MA_TYPE_SMA, //SMA MA_TYPE_EMA, //EMA MA_TYPE_DEMA, //DEMA MA_TYPE_TEMA, //TEMA MA_TYPE_FRAMA, //FRAMA MA_TYPE_LWMA //LWMA }; My input parameters: input int

First few values of iDEMA buffer is garbage and probably others too

Calculating a moving average on price data usually means the first few values of the MA buffer (usually the period), is empty. That makes sense. But on closer inspection I found that the first 8 values of the iDEMA buffer with period of 5 contains a random float value, far removed from the price

CopyBuffer on iCustom in EA returns -1

Hello everyone I cannot get this thing to work. I am trying to read a moving average buffer from a downloaded indicator (AllAverages_v4.9_MT5), and want to read a few values to calculate entry (eg close above MA for a buy). I'll attach the indi file and paste my EA code. #include <Trade\Trade.mqh>

Quick question about default buffer values

Hi all, When I initialize a buffer using SetIndexBuffer(), is the buffer contents filled with EMPTY_VALUE ? Reason for that is I want to check if there is a value at [1] or if it is empty. Thanks

Leaked memory, objects left

Hi all Apologies for the long post but here is my problem: I'm writing an indicator to continuously (ie on every OnCalculate call), plot the last few fractals, and draw support and resistance lines on those closest to High[0] and Low[0].The high fractals are those higher than High[0], and the low

MT4 MACD issues

The MACD in MT4 draws the signal line as a histogram - why when the the rest of the world draw 2 lines is beyond me. Also, the signal line is computed from an SMA not an EMA. Anyway, I downloaded Traditional MACD that corrected these problems - only to discover that when I call iMACD() there is a

2/(n+1) evaluates to 0

Hi all I'm calculating an EMA and the simple expression: int period; double sf; sf = 2/(period+1); ALWAYS EVALUATES TO 0. Even if I hard code the values in, like sf=2/(14+1) it still gives me 0. For the life of me I can't understand why. Please any advice? Thanks

No output and I cannot see the problem. Please help!

Hi I just want to draw a channel line connecting the fractals . But nothing shows up on the chart. Can someone perhaps point out the bug in my code? I'm using MetaEditor Ver 5 Build 2143. Many thanks #property copyright "Copyright 2019 - Cobus Steyn auxanotrading@gmail.com" #property link

Indicator only appears in debugger! (Solved but new problem)

I have this extremely annoying problem - if someone can PLEASE help me. I have written a Hull moving average, but it only appears on my chart when I run the debugger. If I attach it normally it doesn't run. If I exit the debugger, and then compile, it disappears again. Please I need some help. Must