Additional information to status page while trading

Posted By: Sphin

Additional information to status page while trading - 04/07/18 17:38

Is there a chance to add information to the status page while trading so that they are updated the same way as e.g. 'System State'? If I use print(TO_HTML) in the evaluate(PERFORMANCE* perf) function the information are repeatingly listed each time the status page is updated what means that after 100 updates most of the status page is filled with a history of my additional info. Is this a bug or should it be a feature?
BTW print(TO_REPORT) in the evaluate(PERFORMANCE* perf) function doesn't seem to add info to the performance report at all.

Thanks, Sphin
Posted By: jcl

Re: Additional information to status page while trading - 04/09/18 14:03

print(TO_HTML) is correct. I don't know the reason of your problem, but here's the code with which Z12 prints the cells of its algo result table - hope this helps:

Code:
print(TO_HTML,"<td");
if(NumWinLong+NumLossLong+NumWinShort+NumLossShort > 0) {
	if(NoLong || NoShort)
		print(TO_HTML," bgcolor="#FF0000"");
	else if(EquityLongF[0] + EquityShortF[0] > 0)
		print(TO_HTML," bgcolor="#00FF00"");
	print(TO_HTML,">%s:",Algo);
	if(!NoLong && NumWinLong+NumLossLong > 0) print(TO_HTML,"L");
	if(!NoShort && NumWinShort+NumLossShort > 0) print(TO_HTML,"S");
	print(TO_HTML," %+.0f",ProfitClosed+ProfitOpen);
} else
	print(TO_HTML,">");
print(TO_HTML,"</td>");

Posted By: Sphin

Re: Additional information to status page while trading - 04/09/18 16:51

Is this code within the evaluate(PERFORMANCE* perf) function or within the run() function?
Posted By: jcl

Re: Additional information to status page while trading - 04/10/18 11:01

Within the run() function.
Posted By: Sphin

Re: Additional information to status page while trading - 04/15/18 09:49

This seems to work without repeatings, thanks.
© 2024 lite-C Forums