Coding help - page 313

 
BadWay:
Mladen,

Thanks for any help.

I don't know where is the problem.

It did not receive the correct values,please help me to solve...

I'll be looking forward to your reply...

Thanks!

BadWay

Would you mind explaining what exactly are you trying to do with that code?

 
mladen:
BadWay Would you mind explaining what exactly are you trying to do with that code?

Mladen

I just want to practice, do not intend to use it to do something

See Attachment

Files:
test123.mq4  7 kb
 
BadWay:
Mladen

I just want to practice, do not intend to use it to do something

See Attachment

BadWay

If you can not tell me what is the intention of the code, I can not help too much. I need to know the idea of what is intended to be done (apart from practicing) in order to be able to check the code

 
mladen:
BadWay If you can not tell me what is the intention of the code, I can not help too much. I need to know the idea of what is intended to be done (apart from practicing) in order to be able to check the code

What is the intention of the code ?

Inside the test123.mq4 , the bottom.

 
BadWay:
What is the intention of the code ? Inside the test123.mq4 , the bottom.

Sorry, omitted it

For that (to have a cross of each fast ma with slow ma with times and periods) and array that would look something like this

double crosses[][81][2];

would have to be used (81 because the periods are varying from 20 to 100 - 100 included)

also, arrays are, unless it is not specified differently, having inverted indexes compared to buffers. index 0 in an array means the first (oldest) while for a buffer it mean last (newest) value, and only single dimensional arrays can be set as series (to be equivalent to buffers) so, in this case that solution is not possible to use. but then it brings you in a "gray zone" of arrays that, if you are not used to C/C++ like array usage can cause you severe headaches

Why not simplifying the whole problem and checking for crosses only on current or first closed bar?

 
mladen:
Sorry, omitted it

For that (to have a cross of each fast ma with slow ma with times and periods) and array that would look something like this

double crosses[][81][2];

...

Sorry, Mladen

I just made for fun.

Want to see how powerful the mql4,

just forget it.:o

 

Hi mladen,

I just tested the buttons used in the button version of Dolly but converted it into an EA and it worked as far as holding the previous button commands while changing time frames and opening the input window so it would appear to be more of an indicator issue?

 
cja:
Hi mladen, I just tested the buttons used in the button version of Dolly but converted it into an EA and it worked as far as holding the previous button commands while changing time frames and opening the input window so it would appear to be more of an indicator issue?

Do you have a part of the code deletes the buttons in the deinit() function?

If you have it there and it works OK than it means that EAs and indicators are working differently. Will check for myself too, but if that is the case, they are having one major bug again

 
mladen:
Do you have a part of the code deletes the buttons in the deinit() function? If you have it there and it works OK than it means that EAs and indicators are working differently. Will check for myself too, but if that is the case, they are having one major bug again

Yes I had button delete code in the denit() and I had not noticed until I added buttons to the Dolly indicator that the problem existed as the EAs I have coded using buttons function as expected

 
cja:
Yes I had button delete code in the denit() and I had not noticed until I added buttons to the Dolly indicator that the problem existed as the EAs I have coded using buttons function as expected

cja

Something you told me here in this post helped me realize what is going on

The All time frames MA is already working as it should and was posted

Thanks

Mladen