Hi Terranin,
thanks a lot for answering my previous question.
I need one more thing, I have compiled a program/strategy in Delphi and I'm running in Forextester.
I'm using some conditions based on the vlaue of let's say parameter1 and parameter2.
I need to view the vlaue of those paramters in order to see if my condition is met or no. How can I output the value of those paramters to a log file. Should I use print, writeln... what's the syntax. My paramters are of type double.
Thanks in advance!
printing vlariables
- Terranin
- Site Admin
- Posts: 833
- Joined: Sat Oct 21, 2006 4:39 pm
Re: printing vlariables
allan21 wrote:Hi Terranin,
thanks a lot for answering my previous question.
I need one more thing, I have compiled a program/strategy in Delphi and I'm running in Forextester.
I'm using some conditions based on the vlaue of let's say parameter1 and parameter2.
I need to view the vlaue of those paramters in order to see if my condition is met or no. How can I output the value of those paramters to a log file. Should I use print, writeln... what's the syntax. My paramters are of type double.
Thanks in advance!
For this purpose use function Print()
Example:
Print(format('Parameter1 = %.4f', [parameter1]));
Result in log file:
Parameter1 = 1.7453
Example:
Print(format('Parameter1 = %.2f, but Parameter2 = %d', [parameter1, parameter2]));
Result in log file:
Parameter1 = 2.35, but Parameter2 = -11
(Parameter2 should be integer)
%.4f - print double with 4 digits after point
%d - print integer
%s - print string
Hasta la vista
Mike
Mike
Who is online
Users browsing this forum: No registered users and 22 guests