Coding help - page 180

 
mladen:
shtopr,

Take a look at this post : https://www.mql5.com/en/forum/181280/page7

There you will find what is going on when you use multi time frame indicator in an EA and when you back test such an EA

Младен приветствую вас.

Ситуация сложная, И смешно и очень грустно...

Это какие то чудеса...))(

я с августа бьюсь над этим вопросом, обращался к двум специалистам - но безуспешно...

поэтому сам я, эту задачу не решу...((

Возможен ли какой то способ, брать сигнал с Alert(Алерт)??

Ведь Alert(Алерт) работает превосходно!!! и без ошибок.

других мыслей уже нет...

Files:
84702.jpg  145 kb
84702_1.jpg  150 kb
 

Младен приветствую вас.

Это снова я.

Ситуация сложная, И смешно и очень грустно...

Это какие то чудеса...))(

я с августа бьюсь над этим, обращался к двум специалистам - но безуспешно...

поэтому сам я не решу эту задачу...(

Возможен ли какой то способ, брать сигнал с Alert(Алерт)??

Ведь Alert (Алерт) работает превосходно!!! и без ошибок.

других мыслей уже нет...

Files:
84702_1.jpg  150 kb
 

Как удалить лишнее сообщение?????

 
shtopr:
Младен приветствую вас.

Это снова я.

Ситуация сложная, И смешно и очень грустно...

Это какие то чудеса...))(

я с августа бьюсь над этим, обращался к двум специалистам - но безуспешно...

поэтому сам я не решу эту задачу...(

Возможен ли какой то способ, брать сигнал с Alert(Алерт)??

Ведь Alert (Алерт) работает превосходно!!! и без ошибок.

других мыслей уже нет...

shtopr

Please read post at the link that I provided. It explains what is going on

Or use closed bars (not the opened bar - instead of 0 for the bar number use 1 and instead of 1 for the previous bar use 2)

regards

 
mladen:
shtopr

Please read post at the link that I provided. It explains what is going on

Or use closed bars (not the opened bar - instead of 0 for the bar number use 1 and instead of 1 for the previous bar use 2)

regards

Ок. Спасибо.

 
mladen:
kenwa

This is rsi of cci

You will found out that it is very easy to do the same with "kairi" indicator

Hi mladen

refer to #1780 on p.178, i work trial many hours, seems not as simple as cci situation when trial; kairi is having cases inside, get these frustrating fail results as attachments, all cannot work and display, how to make them work ? Thanks again.

(if the indicator has signal line,like PPO, hope to see its rsi of signal line signal as well)

reference link:

Percentage Price Oscillator (PPO) - MQL4 Code Base

Chaikin Oscillator - MQL4 Code Base

Files:
kairitest.mq4  9 kb
ppotest.mq4  4 kb
chotest.mq4  4 kb
 
kenwa:
Hi mladen

refer to #1780 on p.178, i work trial many hours, seems not as simple as cci situation when trial; kairi is having cases inside, get these frustrating fail results as attachments, all cannot work and display, how to make them work ? Thanks again.

(if the indicator has signal line,like PPO, hope to see its rsi of signal line signal as well)

reference link:

Percentage Price Oscillator (PPO) - MQL4 Code Base

Chaikin Oscillator - MQL4 Code Base

Eliminate the case structure for the RSI calculation . You do not need it at all

 
mladen:
Eliminate the case structure for the RSI calculation . You do not need it at all

sorry mladen , not quite understand. i only know copy paste sentences

i trial this test2version below, still not work and quite halting my PC. how to make them work?? could you help me? many thanks.

Files:
 
kenwa:
sorry mladen , not quite understand. i only know copy paste sentences i trial this test2version below, still not work and quite halting my PC. how to make them work?? could you help me? many thanks.

Do it like this

Files:
 
kenwa:
Hi mladen

refer to #1780 on p.178, i work trial many hours, seems not as simple as cci situation when trial; kairi is having cases inside, get these frustrating fail results as attachments, all cannot work and display, how to make them work ? Thanks again.

(if the indicator has signal line,like PPO, hope to see its rsi of signal line signal as well)

reference link:

Percentage Price Oscillator (PPO) - MQL4 Code Base

Chaikin Oscillator - MQL4 Code Base

Looking at the PPOtest you posted.

Your errors comes from these lines :

for(i=0; i<limit; i++)

SignalBuffer=iMAOnArray(PPOBuffer,Bars,SignalEMA,0,MODE_EMA,i); // the for loop is executed for this line only

RSISignalBuffer = iRSIOnArray(SignalBuffer,0,RSIPeriodSignal,i); i--; // You do not need a "i--" when you have a "i++" in a for loop

[/PHP]

Add one more for loop (all "onArray" functions in metatrader demand to be executed on separate loop from an array filling loop) and all will be OK. Like this :

for(i=0; i<limit; i++) SignalBuffer=iMAOnArray(PPOBuffer,Bars,SignalEMA,0,MODE_EMA,i);

for(i=0; i<limit; i++) RSISignalBuffer = iRSIOnArray(SignalBuffer,0,RSIPeriodSignal,i);

[/PHP]

You also might consider changing this kind of loop :

[PHP]for(i=0; i<limit; i++)

to this one :

[PHP]for(i=limit; i>=0; i--)

It will not make a change (in this case) regarding results but better to get used to the second form of the loop