Per Tobias Lindell:
You dont reinstate the global string back to its original value, the more you StringAdd the spread, the more concatenation occurs..simple as that..in local the original value is restored upon function call is done
Hi
I am trying to add the current spread to the comment for a buy / short event. The code is;
comment shall of course be in the OrderSent, but are printed to find the failure.
The code above give;
EA.1. Spread: 0.20.20.20.20.20.20.20.20.20.20.2
The correct print would be :
EA.1. Spread: 0.2
comment are defined as a global variable ;
Why are the 0.2 just repeating ? It will not repeat if I define the comment locally as;
That code will print the correct values.
But of course.. Thanks for the suggestion, works now when I made some modifications.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi
I am trying to add the current spread to the comment for a buy / short event. The code is;
comment shall of course be in the OrderSent, but are printed to find the failure.
The code above give;
EA.1. Spread: 0.20.20.20.20.20.20.20.20.20.20.2
The correct print would be :
EA.1. Spread: 0.2
comment are defined as a global variable ;
Why are the 0.2 just repeating ? It will not repeat if I define the comment locally as;