Page 1 of 1

Need Help with Profit Functions

Posted: 30 Jan 2008
by kevin kolodzy
I have an indicator that I'm trying to convert from TS. It uses I_ClosedEquity and I_OpenEquity. What are the MCFX functions corresponding to these? (NetProfit and OpenPositionProfit give compiler errors.)

I also have a strategy that uses NetProfit and OpenPositionProfit - these appear to compile correctly, but do they work the same as in TS?

Posted: 31 Jan 2008
by Marina Pashkova
Hi Kevin,

I_ClosedEquity and I_OpenEquity are not supported in MCFX at the moment. There are no words that could be used to replace them.

As for NetProfit and OpenPositionProfit, these words work the same way as in TS.

Regards.

Posted: 31 Jan 2008
by kevin kolodzy
As for NetProfit and OpenPositionProfit, these words work the same way as in TS.
Okay, so these words will work in strategies as in TS - but, they cannot be used in indicators? Is there a reason why they cannot - that limitation in TS seems to make no sense, so I am curious as to why you are persisting this useless limitiation?

Compatibility is good to an extent, unless it perpetuates flaws and illogical limitations. I hope you will fix this, or if continuing down the road of compatibility, will provide the I_ versions of functions soon.

Posted: 01 Feb 2008
by Marina Pashkova
Dear Kevin,

According to the EasyLanguage rules "Performance Information and Position Information are not allowed in an indicator" , the reason being that indicators and signals use different functionalities.

Regards.

Posted: 01 Feb 2008
by kevin kolodzy
It's unfortunate that you've chosen to perpetuate the distinction, since it seems artificial - and without supporting the I_ functions (at least at present), there are things that simply won't work or cannot be done in MCFX that I can do in TS.

An important issue for me and several colleagues is equity curve filtering (display the net profit vs. a moving average of same), and that will not work without the I_ functions. Since of course strategy code can't plot, there seems no way to do this.

Any suggestions, or any information on when I_ functions will be added?

Posted: 08 Feb 2008
by Marina Pashkova
Hello Kevin,

Your arguments make perfect sense. There is a way to have these words work in indicators as well. At this point we have our roadmap formed for the next several months, so I'm afraid we won't have the chance to accommodate your request in the nearest future. But we will definitely try to implement this functionality as soon as we have enough resources available.

For now, you can develop a workaround using ADE or global variable.

As for perpetuating TS flaws, we do not emulate everything. We never emulate behavior that is obviously wrong. On the other hand, there are many users who regard any deviations from the TS model as faults - which results in lots of complaints.

Posted: 08 Feb 2008
by kevin kolodzy
Thanks for the update, Marina. I fully understand you must follow a development schedule and only change it if there are major issues.

Often, it is possible to write a function with both default behavior (that strictly emulates TS for the "purists") and optional behavior that implements a more rational or reasonable alternative behavior (often by adding an optional additional argument to the function call, that only those users wanting the alternate capabilities would need to add to their code). As long as this is clearly documented, it could provide everyone with the best of both worlds.