Help in finding the missing snippet

Posted By: MatPed

Help in finding the missing snippet - 07/16/17 09:00

Hi,
I remember that there was in the manual or in a forum post a snippet to print the Algos result as in z systems.
Something that print results as:
EUR/USD CT:L -62
USD/CHF CT:LS -130 HP:S +35
GBP/USD BB:LS +634 CY:LS +466
USD/CAD CT:LS -139
USD/JPY CT:L +884 CY:L +3464
AUD/USD HP:S +1076
NAS100 BB:L +797 CY:L +1768 HP: +5861
SPX500 CY:L -120 HP:L +51
US30 CT:L +1110 CY:LS +688
GER30
XAU/USD HP:LS +4231
XAG/USD HP:LS +3347
UK100 CY:LS +325 HP:L +526

but I can not find it anymore. Has somebody the right like to the manual page and/or forum post?

Thank you in advance
Posted By: jcl

Re: Help in finding the missing snippet - 07/17/17 09:30

This is some of the code for a cell in the results table in Z1/Z2:

Code:
print(TO_HTML,"<td");
if(NumWinLong+NumLossLong+NumWinShort+NumLossShort > 0) {
	print(TO_HTML," bgcolor=\"#FF0000\"");
	print(TO_HTML,">%s:",Algo);
	if(NumWinLong+NumLossLong > 0) print(TO_HTML,"L"); 
	if(NumWinShort+NumLossShort > 0) print(TO_HTML,"S");
	print(TO_HTML," %+.0f",ProfitClosed+ProfitOpen);
} else
	print(TO_HTML,">");
print(TO_HTML,"</td>");

Posted By: MatPed

Re: Help in finding the missing snippet - 07/17/17 09:32

God Bless you! laugh
Posted By: MatPed

Re: Help in finding the missing snippet - 08/14/17 17:28

Hi Jcl,
I gave a look to the code and I understand that you are playing in another league from a coding perspective, but I really need some explanation, because the code snippet you have posted is obscure to a simple mind like me laugh
I am stuck with the first line what is the "<td" string?
I do not understand the logic the snippet is printing only from the algo, nothing is printed regarding the Asset.
Should i call the snippet to update the Status report within the Algo/Asset loop or is better in a tick/tok function?

Thank you
Posted By: Dalla

Re: Help in finding the missing snippet - 08/15/17 06:54

<td is just partial HTML code.

The output will read something like
<td bgcolor="#FF0000">MyAlgoName: L 100</td>
or just
<td></td> (empty cell)
depending on the evaluation of the if/else block
Posted By: MatPed

Re: Help in finding the missing snippet - 08/15/17 16:22

ok, thank you for your answer my html knowledge is zero!
Probably this is the reason I am struggling formatting a decent output with Zorro!

Ciao
© 2024 lite-C Forums