RTFM: WriteIf is working fine

The code below shows Printf in Inerpretation Window, but the Writif code does not show with the if statement. If I remove the If statement the Writeif will show in the interpretation window.

if(Status("action")== actionCommentary)
{
WriteIf(4 > 1,EncodeColor( colorGreen )+"<b>BUY</b>", EncodeColor( colorRed )+"<b>SELL</b>");
printf(EncodeColor( colorBlack ) + "<b>Current Status TODAY</b>\n");
}

You need to return result!

if(Status("action")== actionCommentary)
{
	result = WriteIf(4 > 1,EncodeColor( colorGreen )+"<b>BUY</b>", EncodeColor( colorRed )+"<b>SELL</b>");
	printf(EncodeColor( colorBlack ) + "<b>Current Status TODAY</b>\n" + result);
}

34

1 Like

Sorry I missed that! Thanks so much!