Problem with output values of indicators - has anybody noticed it ? - page 2

 

Finally it's working, but i had to put the SHIFT parameter to 1 instead of 0, and to look "in the past" of 1 bar to have the right value.

I don't understand why and it's giving my signals 1 bar late, but at least it's a good start.

If anybody know why ?

Thanks,

Keyrama

 

keyrama,

checking last completed bar value on opening of a new bar & giving signal/alert only once per bar is best practice to my knowledge. Why would you want EA to check bar 0 value on every tick -- lest you want to 'babysit' charts ? Anyways, check out this article, might be useful...

 

" checking last completed bar value on opening of a new bar & giving signal/alert only once per bar is best practice to my knowledge "

I agree with you.

But right now i have the signal not at the opening of the new bar, but at the opening of the new bar +1.

So I would like my EA to check the value of the bar just closed after 1 tick and not after one whole bar.

 

keyrama:
... But right now i have the signal not at the opening of the new bar, but at the opening of the new bar +1.
So I would like my EA to check the value of the bar just closed after 1 tick and not after one whole bar.

Viffer, for one, had unsuccessfully tried to reproduce your problem. So far you haven't given us a lot to help... show the snippet where the EA calls the Indy. the problem is probably involving loops & indexing.
 

I apologize guys, I was not accurate in describing the problem because in fact i'm not the programmer but the system designer.

We solved the problem. ( we were looking for the PRICE_CLOSE value of the custom indicator in the first tick of a the "present" not yet completed bar! )

Thank you for your patience and your help !

Keyrama

Reason: