Function commision, no return value

Questions about MultiCharts and user contributed studies.
wegi
Posts: 121
Joined: 02 Jun 2009
Has thanked: 5 times
Been thanked: 12 times

Function commision, no return value

Postby wegi » 20 Jul 2009

Hi,


the powerlanguage function: commision does not return a value,
if a choose: Commision $ per Share/Contract at the strategy property page.
I entered: 0.0004, and i only get the value with the option: commisions $ per Trade.

Why ?

thx

Wegi

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 21 Jul 2009

Please try to print the commission value this way:
print(commission:5:5);

wegi
Posts: 121
Joined: 02 Jun 2009
Has thanked: 5 times
Been thanked: 12 times

Postby wegi » 21 Jul 2009

It works, thank you.

But i dont know why it works now.
I tested it with: print(date, NumToStr(commission,5));

Now it returns a value,
few days before it doesn´t.

I used the same workspace and the same signal.

Maybee a restart of my pc was necessary :-)

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 22 Jul 2009

Did you use the same command? Precision does matter.

wegi
Posts: 121
Joined: 02 Jun 2009
Has thanked: 5 times
Been thanked: 12 times

Postby wegi » 22 Jul 2009

Yes,
because i opend the same workspace with the same signal script.


Return to “MultiCharts”