Property conversion

 

Is it possible to use property as string?

#property version   "2.21"

When I make some changes in EA, then I want to be sure that new version is used in tester. So one way is to see its version number ("2.21") immediately on chart, so first I have to convert that property to string probably and (further I know already)...

 
SteelAce:

Is it possible to use property as string?

#property version   "2.21"

When I make some changes in EA, then I want to be sure that new version is used in tester. So one way is to see its version number ("2.21") immediately on chart, so first I have to convert that property to string probably and (further I know already)...

You can use a workaround like:


    #property version     "1.8"
    #define   _VERSION_   "1.8"

And use the "_VERSION_" keyword on your code... 

 
Flavio Jarabeck #: And use the "_VERSION_" keyword on your code... 

You have two values that must be the same; an error waiting to happen. Simplify and prevent:

    #define   _VERSION_   "1.8"
    #property version     _VERSION_
 
William Roeder #:

You have two values that must be the same; an error waiting to happen. Simplify and prevent:

Thank you! I shall use your solution!

Reason: