• Sign up >>

Requests & Ideas - page 45

t2g
29
t2g  

Hello mladen.

I tried to make an EA by using HMA indicator which you gave me.

I want to get signals when HMA changes color.

I coded like this.

double HMA_up1 = iCustom(NULL,0,"HMA",1,1);

double HMA_up 2= iCustom(NULL,0,"HMA",1,2);

double HMA_down1 = iCustom(NULL,0,"HMA",3,1);

double HMA_down2 = iCustom(NULL,0,"HMA",3,2);

if (HMA_down2 != EMPTY_VALUE && HMA_up1 != EMPTY_VALUE) ====> BUY;

if (HMA_up2 != EMPTY_VALUE && HMA_down1 != EMPTY_VALUE) ====> SELL;

but EA doesn't trade as I wanted.

I can't understand which buffers I have to use and how to code them......

I just want to get buy sell signals when HMA changes color.

I'm beginner of coding. please teach me.

sorry for my stupid question.

thanks

t2g

biddick
339
biddick  

In Tradecesion software something called ''noise removal'' Market Noise Removal, Technical Analysis, Price Chart

It looks interesting but I dont have an idea about the foundation of this''noise removal''.

Mladen Rakic
163290
Mladen Rakic  

t2g

In my experience, when it comes to EAs and using indicators from EAs, the rule is "less is more". Multi time framing and multi coloring indicators are made for visual "experience", so in the end, they are meant for manual trading. And with repainting problems that metatrader has with multi color indicators, code to avoid repainting just makes it more complicated than it is necessary when it comes to information we need in an EA to do the job.

Here is that same hull moving average adapted to be used from an EA. It has only 2 states : +1 when the slope of the hma is up and -1 when it is down. This one is made to continue the trend when the slope is 0 (so instead of treating it as a trend change or a neutral trend, it treats 2 consecutive equal values as trend continuation). And when you use it from EA, all you have to do is the following
int barToCheck = 1; // for checking closed bar, set to 0 to check open bar

int timeFrame = 0; // for current time frame, set to desired time frame

double currValue = iCustom(NULL,timeFrame,"HMA for EA",HMAPeriod,HMAPrice,HMAMethod,0,barToCheck);

double prevValue = iCustom(NULL,timeFrame,"HMA for EA",HMAPeriod,HMAPrice,HMAMethod,0,barToCheck+1);

if (currValue!=prevValue)

if (currValue=1)

... code for buy

else ... code for sell

Here is the comparison of "states" of the "for EA" indicator and "regular" HMA. So, a lot of times, first step when it comes to making an EA is indicators simplification to adapt them for easier usage from an EA and only then making the EA itself and frankly, that is one of the reasons I insist on simple and clean code of indicators - much easier to adapt something clean.
regards

Mladen

t2g:
Hello mladen.

I tried to make an EA by using HMA indicator which you gave me.

I want to get signals when HMA changes color.

I coded like this.

double HMA_up1 = iCustom(NULL,0,"HMA",1,1);

double HMA_up 2= iCustom(NULL,0,"HMA",1,2);

double HMA_down1 = iCustom(NULL,0,"HMA",3,1);

double HMA_down2 = iCustom(NULL,0,"HMA",3,2);

if (HMA_down2 != EMPTY_VALUE && HMA_up1 != EMPTY_VALUE) ====> BUY;

if (HMA_up2 != EMPTY_VALUE && HMA_down1 != EMPTY_VALUE) ====> SELL;

but EA doesn't trade as I wanted.

I can't understand which buffers I have to use and how to code them......

I just want to get buy sell signals when HMA changes color.

I'm beginner of coding. please teach me.

sorry for my stupid question.

thanks

t2g
Files:
t2g
29
t2g  

Hi mladen. Thanks a lot for your reply.

I could make my EA by using HMA fo EA indicator as you mentioned.

now my EA is working as I wanted.(but back test result is terrible...... )

I know that I'm asking you too much and disturbing your time,

but this is my last request ..........

if you have time please make multi time frame version of "HMA fo EA" indicator.( I don't know it is using same calculation or not but please make it by using "HMA" which you gave me indicator's calculation)

if this doesn't work I will give up making my EA........

please.........

Regards,

t2g

SIMBA
2078
SIMBA  
MrM:
This would be DRB: dynamic range bars. CRB's are defined as a constant number of pips, not as an ATR/variance/volatility multiplier. I'm reading the paper right now to know exactly what they meant. I think this is more about short-term realized volatility than about implied vol. Michal from mqlservice did the first CRB script for me, he told me it would be easily adaptable to change from #pips into a variable. Now I need to do my homework and see what that variable is ...

MrM,

Yes,I know what a CRB is ,my comments stemmed from the fact that ATR is mean reversing,so,whatever period you use to calculate it,you will end up,either using the average of the period(practically the same as using CRBs with pip range=ATR(x) which I tested for weeks with no results) or using the last ATR input,which may add even more noise to the data,due to its continuous variability bar to bar.

Regards

S

zipfrog
110
zipfrog  
mrtools:
Nah ain't underground, still a work in progress

Sorry for my doubting post, think I got overexcited regarding the potential of nesting cycles! On an unrelated note, does fourier extrapolation of full SSA normalized repaint closed bars? To be more precise, does it change past numerical values once they are finished the current candle?

Best regards,

Zipfrog

P.S. Nevermind the question, only a few hours till the market opens now and I will check myself, just thought someone might know offhand.

P.S.S. Lol, The first setting in the indicator is SSA lag.....feel like a moron for asking that question...especially considering I was sober!

Michal Smilauer
54
Michal Smilauer  

Request for filters

I've attached an EA. It's es_capelast 1.04 reversed ECN from this thread:

https://www.forex-tsd.com/expert-advisors-metatrader-4/22058-aggressive-scalp-ea-69.html

Could you add some regular filters?

Like:

* EMA(34) and EMA(204) - when price is above both the indicators - only long, when lower - only short. When between, don't allow any position.

* basic RSI filter

* basic Stochastic filter

* maybe also some another basic filter (I'm not very experienced in Forex)

Thank You,

Daffi

William Snyder
9493
William Snyder  
t2g:
Hi mladen. Thanks a lot for your reply.

I could make my EA by using HMA fo EA indicator as you mentioned.

now my EA is working as I wanted.(but back test result is terrible...... )

I know that I'm asking you too much and disturbing your time,

but this is my last request ..........

if you have time please make multi time frame version of "HMA fo EA" indicator.( I don't know it is using same calculation or not but please make it by using "HMA" which you gave me indicator's calculation)

if this doesn't work I will give up making my EA........

please.........

Regards,

t2g

Hi T2g,

Don't need to make another indicator, in your Ea change your call to Hma indicator like this iCustom(NULL,0,"Hma for Ea",hmaperiod,hmaprice,0,1) toiCustom(NULL,hmatf,"Hma for Ea",hmaperiod,hmaprice,0,1). Then add hmatf to external parameters, extern int hmatf = 1440 or whatever timeframe you choose then while testing you just have to open it up and change to whatever timeframe you choose.

vishalgandhi
55
vishalgandhi  

Request For Best Combination Manual Trading System Indicators

Hi Mladen .

Short Intro I Am Just Starting trading. I Trade In Indian Nse & Mcx. I Am Trading Manually. I am So Much Confused In Finalizing Best Manual Trading System. Its My Request Please Help Me.

Some Screen shots

t2g
29
t2g  
mrtools:
Hi T2g, Don't need to make another indicator, in your Ea change your call to Hma indicator like this iCustom(NULL,0,"Hma for Ea",hmaperiod,hmaprice,0,1) toiCustom(NULL,hmatf,"Hma for Ea",hmaperiod,hmaprice,0,1). Then add hmatf to external parameters, extern int hmatf = 1440 or whatever timeframe you choose then while testing you just have to open it up and change to whatever timeframe you choose.

hi mrtools.

thank you very much for your reply.

yes, I had tried it already. my EA works on 1M chart by using 1H "HMA for EA" indicator's value. I back tested my EA by visual mode and after finishing it I put 1H "HMA" indicator on chart but entry point was totally different.

so I just wanted to confirm 1H "HMA" and 1H "HMA for EA" are working same on 1M chart.

today is Sunday so I will check tomorrow how 1H "HMA" indicator works on 1M chart.

thanks.

Regards

t2g