Hi Amine,
Following the advice from your reply I have updated my strategy and it works (very surprising for me !!!).
But thank you.
What I did:
1. Create sting variable positionText with Initial Value = Initial Text
2. Added this to the Position definition
3. Updated the variable positionText when the price was ~ close to my position
4. Exported strategy and run it in Historical Tester on jForex. See report at the end:
But this is not very useful yet.
Now going further, I wanted to assign in the Trade.Comment a Double variable. As you can imagine, a similar error was raised. Which is a shame. Java has automatic casting.
5. Find my text in the .java strategy
6. And update "comsa"
7. Exported strategy and run it in Historical Tester on jForex. See report at the end:
This is useful now....
But it all can be avoided if you would create a setter method to the Trade.Comment as it has for SL and TP.