|
*function* trace_output(show,text)
{
*if* (show)
{ _TRACE(text); }
*else*
{ *Null* ;}
}
show = ParamToggle( "Tracing Output", "No|Yes", 0) ;
text = "just a test";
*for* (i = 1; i< 10; i++)
{
trace_output(show,text);
}
|
On 1/12/2010 3:11 PM, schnitt_tt wrote:
Hi,
trying to make my coding more comfortable. In every Indicator i`d like to have
a Parameter that enables me to show the trace output inside the LOG-Window or
not.
therefor i wrote an include for the "TRACE-OUT" handling. Everytime i start the indicator via
"Verify syntax" inside the EDITOR, every runs fine. but if i scroll the chart, it seems the value
of the global variable show get`s overwriten the LOG-Window shows some output although the Parameter ist set
to "0".
any ideas ??
-------------------
// +++++++++++++++++++++++++++++++++++++++
// TRACE include
// +++++++++++++++++++++++++++++++++++++++
global show;
function trace_output(text)
{
if show == 1
{ _trace(text); }
else
{ // User don`t want to show trace }
}
//++++++++++++++++++++++++++++++
//MAIN Programm
//++++++++++++++++++++++++++++++
include "Trace include"
show = Param( "Trace Output", 0, 0, 1, 1, sincr = 0 ) ;
.....
for i ...
{
trace_output("just a test");
}
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links