After adding the following code:
Code: Select all
condition3 = PosTradeEntryName(1,PosTradeCount(1)) <> "XXXXXXXXXXXX" ;
I got this message "STD exception: invalid argument".
What is the problem with it?
Kind regards.
Code: Select all
condition3 = PosTradeEntryName(1,PosTradeCount(1)) <> "XXXXXXXXXXXX" ;
Code: Select all
once cleardebug;
var: TC(0);
TC = PosTradeCount(0);
print("TC = ", TC, " Currentbar = ", currentbar);
if(tc > 1) then
begin
TC = PosTradeCount(1);
print(" - TC = ", TC, " Currentbar = ", currentbar);
print("PositionName = ", PosTradeEntryName(1, TC));
end
"once cleardebug;" is to clean up the output tab of the PowerLanguage Editor. Usually it is placed at the beginning of the code. You can delete or comment this line in case you do not need it.Hey Henry,
You rule!!
It worked.
This functions are so important to simplify the code and to maximize the strategy.
Just one more question, the "once cleardebug;" instruction should be placed in the beginning of the signal or is it irrelevant?
Thank you very much for the help.
Kind regards.