Please help me understand what's going on here - page 2

 

it isnt that Close[0] is a less accurate representation of the market, it is because in mql4 the close price is the last price quote recieved. so every time a new tick arrives Close[0] is updated to reflect that latest bid price. This means any indicator using Close[0] will constantly change values as new ticks arrive. The difference between that and a previous Close[] is Close[1] is the very last price quote recieved during the whole time period of that bar.

 
SDC:

it isnt that Close[0] is a less accurate representation of the market, it is because in mql4 the close price is the last price quote recieved. so every time a new tick arrives Close[0] is updated to reflect that latest bid price. This means any indicator using Close[0] will constantly change values as new ticks arrive. The difference between that and a previous Close[] is Close[1] is the very last price quote recieved during the whole time period of that bar.


Yes, I understand that - but from what I understand that should not apply to my situation because:

1) The EA is being run in the strategy tester on "Open Bars" mode and

2) The script is being run on the static visual chart produced by strategy tester (1) at the completion of its run.

 
Try adding a few more Print statements so you can check other variables to make sure they have values that you expect . . . going to bed now, will take a look in the morning.
 

Hello

I am having the same problem.

I have 3 lines of code at the beginning of my start function.

They run at every tick.

Basically it says

Takein0 = icustom(........."fib"....0)

Takein1 = icustom(........."fib"....1)

Takein2 = icustom(........."fib"....2)

the function is properly filled with the variables, so no problem there.

Also the variables are accessible by any part of the program..

The only thing is that only Takein0 gives me updated values. Takein1 and Takein2 never change....

any idea??anyone?

thanks

 
strive4more:


any idea??anyone?

thanks

Little difficult to help without seeing any code . . .
 
strive4more:

Hello

I am having the same problem.

I have 3 lines of code at the beginning of my start function.

They run at every tick.

Basically it says

Takein0 = icustom(........."fib"....0)

Takein1 = icustom(........."fib"....1)

Takein2 = icustom(........."fib"....2)

the function is properly filled with the variables, so no problem there.

Also the variables are accessible by any part of the program..

The only thing is that only Takein0 gives me updated values. Takein1 and Takein2 never change....

any idea??anyone?

thanks

Of course, they won't change, Until bar0 finishes... if "fib" refers to Fibo levels, if I understand this correctly.

Reason: