I created a test indicator (accepting the default values of the wizard just to have a bare minimum indicator, in order to debug the odd behavior)
The resulting created indicator code and the test code:
protected override void OnBarUpdate()
{
Print("");
for (int idx =0; idx < 20; idx++)
{
Print("Value before : " + Close[idx]);
}
Print("");
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
Plot0.Set(Close[0]);
}
After loading this to a "3Minutes YM Chart, Connected to simulator", I get the following odd result:
Value before : 10594
1. The print shows only one value (the above value)
2. This value is not even the last value showing on the chart ( 10729 is the last value).
3. 10 minutes, 30 minutes and An hour later, I still get the same single value.
I changed the code to the following:
protected override void OnBarUpdate()
{
Print("Value After : " + Close[0]);
Print("Value After 2: " + Close[1]);
Print("Value After 3: " + Close[2]);
Print("");
for (int idx =0; idx < 20; idx++)
{
Print("Value before : " + Close[idx]);
}
Print("");
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
Plot0.Set(Close[0]);
}
The result (some 10 minutes later):
Value After : 10594
That's it!??? No need to tell you that this is very odd and extremely frustrating.
I desperately need your help and solution to this bug as all my work is currently suspended until this is resolved.
Obi
Comment