is awesome.. my experiences, plus suggestion

Questions about MultiCharts .NET and user contributed studies.
Posts: 186
Joined: 10 May 2012
Has thanked: 14 times
Been thanked: 10 times is awesome.. my experiences, plus suggestion

Postby KhaosTrader » 31 Jul 2013

I am moving a lot of my easylanguage code to

I really like the .net platform so much better. Sure its a bit more coding, but the flexibility and the ability to use classes, objects, and even inheritance is very good.

I am pretty new to c# but here is something that I have found (sort of a workaround) for a limitation regarding plotobjects and powerlanguage functions.

One trick that i did do, that i can share, is that i wanted to "hold" my IplotObjects in a class which is in a function. I had a hard time at first because when i called the "AddPlot" method in a function, it gave an error, so I thought it wasnt possible.. But then what i decided to do was to make public the members of the class in the class that was in the function, then i basically have the "Create" function in the Indicator access those public Iplotobjects inthe class that is in the function and the i do the addplot calls there, then I have encapsulated the iplotobjects in my class which is outside of the indicator.

Honestly, it would be great if we could have full indicator capability in a function. For example, what if I want to add a fancy trailing stop and targeting logic capability to my study? I can house the logic in a function, but then i must write all this iplotobject calls in my indicator (the way i describe above). Wouldnt it be best if i could just instantiate an object in the function and have the class in the function do all my work, plus the object expose member properties for me to do other stuff?

This would be also good for strategies, as the ability to do sophisticated draws,labels,trendlines,and plots would be great to have fully encapsulated in a seperate object that is in a powerlanguage function.

Anyway, those are my thoughts.

User avatar
Alex MultiCharts
Posts: 194
Joined: 09 Aug 2013
Has thanked: 43 times
Been thanked: 76 times

Re: is awesome.. my experiences, plus suggestion

Postby Alex MultiCharts » 13 Aug 2013

Unfortunately, it is not possible to execute this functionality by design.
In MultiCharts .NET a function is a universal object, which can be used either in an indicator, or in a signal. But the functionality of signals and indicators is different.

Return to “MultiCharts .NET”