Coding help - page 375

 
grego:
just 3 parameters in indicator, all 3 the same parameters

Sorry, no idea what is going on with your test

 

Please help me.

Anybody used before the fxdreema EA builder site? How can I do multitimeframe EA? I tryed find help in the forum, but they are don't know how available what I want.

If anybody made multitimeframe indicator or expert before, please make one for a stochastatic oscillator what I write on the forum and share the link. I just wanna see an example, that how available the multitimeframe.

As free user you can create limitless contacts, just cannot download directly. Need go to menu Projects -> Create a shared copy (you can make only 3 times per day), and after from the generated weblink you can download what you made.

Here is the forum link about my conversation:

https://fxdreema.com/forum/viewtopic.php?f=2&t=2664

(maybe need a very short registration, but I'm not sure this.)

 
camaropeti:
Please help me.

Anybody used before the fxdreema EA builder site? How can I do multitimeframe EA? I tryed find help in the forum, but they are don't know how available what I want.

If anybody made multitimeframe indicator or expert before, please make one for a stochastatic oscillator what I write on the forum and share the link. I just wanna see an example, that how available the multitimeframe.

As free user you can create limitless contacts, just cannot download directly. Need go to menu Projects -> Create a shared copy (you can make only 3 times per day), and after from the generated weblink you can download what you made.

Here is the forum link about my conversation:

https://fxdreema.com/forum/viewtopic.php?f=2&t=2664

(maybe need a very short registration, but I'm not sure this.)

camaropeti

take a look at this thread : https://www.mql5.com/en/forum/173574

A lot of working multi time frame indicators posted there. I recommend that you start from the last posts (there are the multi time frame versions compatible with new metatrader 4)

After that, you can take a look at this thread : https://www.mql5.com/en/forum/181423

And so on (there are a lot of eas already capable of using multi time frame)

 

Thank your answer, you are very helpfully, but I said that anybody make one example for multitimeframe Stoch, on the fxdreema site because, I want see what is the solution for this problem. And After when I see with one indicator and understand how it works, I want making my Expert what will be multitimeframe and will use more than one indicator.

And If anyboy made an Expert with fxdreema, please put to the metatrader strategy tester, because I tryed creating multitimeframe, but there is no one worked

 
camaropeti:
Thank your answer, you are very helpfully, but I said that anybody make one example for multitimeframe Stoch, on the fxdreema site because, I want see what is the solution for this problem. And After when I see with one indicator and understand how it works, I want making my Expert what will be multitimeframe and will use more than one indicator. And If anyboy made an Expert with fxdreema, please put to the metatrader strategy tester, because I tryed creating multitimeframe, but there is no one worked

Using multi time frame stochastic from an EA is very simple

Simply use something like this :

double stochasticValue = iStochastic(NULL,timeFrame,kPeriod,dPeriod,slowing,MODE_SMA,0,MODE_MAIN,1)

for a main stochastic value of a desired timeFrame of a first closed bar (the 1 - last argument in the line)

Custom indicator are equally simple : just replace the iStochastic() with iCustom(NULL, timeFrame, indicatorName, ....parameters..., bufferNo,shift) and that is all

 
mladen:
Using multi time frame stochastic from an EA is very simple

Simply use something like this :

double stochasticValue = iStochastic(NULL,timeFrame,kPeriod,dPeriod,slowing,MODE_SMA,0,MODE_MAIN,1)

for a main stochastic value of a desired timeFrame of a first closed bar (the 1 - last argument in the line)

Custom indicator are equally simple : just replace the iStochastic() with iCustom(NULL, timeFrame, indicatorName, ....parameters..., bufferNo,shift) and that is all

You are very professional, but I dont' understand the code language even if you say what is what.

I not want write codes.

I happy, that I understand lot of functions on fxdreema, and I can create simple EAs, and not need coding.

I'm not sure, but I think in your code you said, that the stoch will working if I change the timeframe in the metatrader the indicator will change for that timeframe. Onether words, the indicator's timeframe is same what I set in the metatrader chart timeframe. Or maybe one specified timeframe

The multitimeframe I mean like what I wrote on the fx dreema forum. I copy for here:

"for example there is the stochastatic oscillator and I make an EA what see only that. The Stoch... is on M15 timeframe going down, M5 timeframe is going down, but M1 timeframe going up.

In this case If EA see only the 1 minute timeframe (The actual what setting on metatrader), it want buy, but the good strategy is waiting while the M1 timefrmae going down again, and sell.

I want that see M1, M5, M15 timeframes all together, and start trading when the indicator is same direction on every timeframe."

I mean the every timeframe that M1- M15

 

On fxdreema, I tried this, but of course not worked. The orange dot mean the block is true, the yellow mean the opposite event.

Files:
forum.jpg  44 kb
 

Hi guys,

Could anyone please help me fix this one indicator ?

I tried to make it work on Bar Open,it compiles ok, looks ok in Strategy Tester ... but it fails in real account.. draws correct legs .. but sometimes it jumps one candle back and stops on Close [ or around close ] of the bar instead of Open.. WTH ?

Here's the code ( ZigZag Open Sar )

#property indicator_chart_window

#property indicator_buffers 3

#property indicator_color1 Gray

#property indicator_color3 Orange

extern double Step=0.02;

extern double Maximum=0.2;

extern bool ExtremumsShift=1;

extern int History=0;

//--

double Peak[],

Trough[],

SAR[];

//=============================================================

int init()

{

SetIndexBuffer(0,Peak);

SetIndexStyle(0,DRAW_ZIGZAG);

SetIndexLabel(0,"Peak");

SetIndexEmptyValue(0,0.0);

SetIndexBuffer(1,Trough);

SetIndexStyle(1,DRAW_ZIGZAG);

SetIndexLabel(1,"Trough");

SetIndexEmptyValue(1,0.0);

SetIndexBuffer(2,SAR);

SetIndexStyle(2,DRAW_ARROW);

SetIndexArrow(2,159);

SetIndexLabel(2,"SAR");

SetIndexEmptyValue(2,0.0);

return(0);

}

//=============================================================

int start()

{

static int BarsPrev;

bool MissBars=Bars-BarsPrev>1;

bool NewBar=Bars-BarsPrev==1;

if(MissBars && BarsPrev!=0) BarsPrev=reinit();

int limit=Bars-BarsPrev-(BarsPrev==0); BarsPrev=Bars;

if(History!=0 && limit>History) limit=History-1;

for(int i=limit; i>=0; i--)

{

SAR=iSAR(NULL,0,Step,Maximum, i);

double mid[2];

mid[0]=(Open+Open)/2;

mid[1]=(Open+Open)/2;

static int j;

static bool dir;

static double h,l;

int shift;

if(i>0) j++;

if(dir)

{

if(h<Open) {h=Open; j=NewBar;}

if(SARmid[0])

{

shift=i+ExtremumsShift*(j+NewBar);

Peak[shift]=h;

dir=0;

l=Open; j=0;

}

}

else

{

if(l>Open) {l=Open; j=NewBar;}

if(SAR>=mid[1] && SAR<mid[0])

{

shift=i+ExtremumsShift*(j+NewBar);

Trough[shift]=l;

dir=1;

h=Open; j=0;

}

}

}

// if(MissBars) Print("limit: ",limit," Bars:",Bars," IndicatorCounted: ",IndicatorCounted());

return(0);

}

//=============================================================

//

int reinit()

{

ArrayInitialize(Peak,0.0);

ArrayInitialize(Trough,0.0);

ArrayInitialize(SAR,0.0);

return(0);

}

Thanks in advance !

 

Why works 123.mq4 ..... file ABC.mq4 not works Build 711 ? Both files code are identical. What should improve of code to file works Build 711 ?

.

123.mq4

abc.mq4

Files:
123.mq4  7 kb
abc.mq4  7 kb
 
popej30:
Why works 123.mq4 ..... file ABC.mq4 not works Build 711 ? Both files code are identical. What should improve of code to file works Build 711 ?

.

123.mq4

abc.mq4

Here is the version that works : abc_nmc.mq4

Files:
abc_nmc.mq4  7 kb
Reason: