EA (and indicator) use old version despite new compile

 

A bit of a weird issue here. I write a lot of EA's and indicators, and I compile all the time of course. Sometimes, I apply the EA and indicators to a chart using a template. Now what I see is that the previous version of said code is running, until I hit recompile - until I apply the template that is! I noticed that the time stamp on the ex4 does not change after recompile, so clearly this is connected.

One way I found around it, is to insert a blank space in the source, and then recompile, after which the ex4 time stamp is, as expected, updated, the change is persistent, and applying the template produces the correct result. Anyone seen this?
 
jepper: Anyone seen this?

Changing the source code does not change the executable until you compile. Why does that surprise you?

 
William Roeder #:

Changing the source code does not change the executable until you compile. Why does that surprise you?

The code *is* compiled (over and over, and then over). The time stamp however *unchanged*. There are *no* compilation errors. I will provide better evidence, should I encounter this again.
 

It looks like the problem occurs when one takes the following steps:

Create a chart template with a custom indicator.

Make a code change to said indicator and compile. The chart now has the latest, code.

Re-apply the chart template. Now the chart has reverted to the custom indicator as it existed when the chart template was saved.

Grateful for comments and insight. Luck all :)

 
  1. jepper #: The code *is* compiled (over and over, and then over). The time stamp however *unchanged*.

    If the time stamp did not change you didn't compile that file.

  2. jepper #:

    Make a code change to said indicator and compile. The chart now has the latest, code.

    Re-apply the chart template. Now the chart has reverted to the custom indicator as it existed when the chart template was saved.

    No. It has not reverted; there are no saved versions to revert to. Applying the template just reset the indicator's parameters to what is in the template.