Need Help with Profit Functions

Questions about MCFX and MCFX Data Feed.
kevin kolodzy
Posts: 64
Joined: 25 Jan 2008

Need Help with Profit Functions

Postby kevin kolodzy » 30 Jan 2008

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?

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 31 Jan 2008

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.

kevin kolodzy
Posts: 64
Joined: 25 Jan 2008

Postby kevin kolodzy » 31 Jan 2008

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.

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 01 Feb 2008

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.

kevin kolodzy
Posts: 64
Joined: 25 Jan 2008

Postby kevin kolodzy » 01 Feb 2008

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?

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 08 Feb 2008

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.

kevin kolodzy
Posts: 64
Joined: 25 Jan 2008

Postby kevin kolodzy » 08 Feb 2008

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.


Return to “MCFX”