Hi, I'm new to netframework programming an to C# so this is a new interesting journey for me.
I've a question about this.
Are NT scripts compatible and avaliable on MC.NET
If it's true, much work already done on NT can be migrated to MC.NET.
Regards
Converting Ninjascripts to MC.NET [SOLVED]
- CrazyNasdaq
- Posts: 321
- Joined: 02 Sep 2009
- Location: ITALY
- Has thanked: 98 times
- Been thanked: 89 times
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Ninjascripts on MC.NET
Hello CrazyNasdaq,
NT scripts are not compatible with MultiCharts .Net.
You can use the same logic but the reserved words are different.
NT scripts are not compatible with MultiCharts .Net.
You can use the same logic but the reserved words are different.
Re: MC.Net vs regular MC comparison list
With MC EL / PL, one of the cool virtues of it has been the ability to leverage the many years of coding generated from TS gurus.
With respect to MC .NET, is there something comparable? As an example, will users of MC .NET be able to use code from let's say NT just as easily?
For those of us who are not programmers, and might not be willing or able to dedicate the time to such a learning curve, it would be very helpful to know that such access is available...
With respect to MC .NET, is there something comparable? As an example, will users of MC .NET be able to use code from let's say NT just as easily?
For those of us who are not programmers, and might not be willing or able to dedicate the time to such a learning curve, it would be very helpful to know that such access is available...
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Converting Ninjascripts to MC.NET
For the inquisitive minds,
here are the codes of
SMA from NT, and the
Moving Average 3 Lines from MC.net.
The experts can give a rundown on each.
here are the codes of
SMA from NT, and the
Moving Average 3 Lines from MC.net.
The experts can give a rundown on each.
- Attachments
-
- Mov_Avg_3_lines_NET.txt
- (4.18 KiB) Downloaded 800 times
-
- SMA_Ninja.txt
- (6.29 KiB) Downloaded 756 times
Re: Converting Ninjascripts to MC.NET
TJ, thank you for moving my post to this more appropriate discussion. My apologies. My question was somewhat more general I suppose, inquiring if there was some likely, natural conversion such as TS has been for MC...
One that I know many would like to see is Market / Volume Profile. If indeed Ninjasripts can be easily ported-over to MC.NET, that would be awesome. Might the GOM Market Profile indicator be something we can expect?
Mostly curious if MC .NET has an analogous platform that it can leverage that TS has been for the original MC...
One that I know many would like to see is Market / Volume Profile. If indeed Ninjasripts can be easily ported-over to MC.NET, that would be awesome. Might the GOM Market Profile indicator be something we can expect?
Mostly curious if MC .NET has an analogous platform that it can leverage that TS has been for the original MC...
Re: Converting Ninjascripts to MC.NET
Fewer lines of code to accomplish the same thing strikes me as better and more efficient. But I'm not an expert programmer. So MC .NET wins out here vs. NT IMHO.For the inquisitive minds,
here are the codes of
SMA from NT, and the
Moving Average 3 Lines from MC.net.
The experts can give a rundown on each.
-
- Posts: 64
- Joined: 15 Aug 2011
- Has thanked: 3 times
- Been thanked: 50 times
Re: Converting Ninjascripts to MC.NET [SOLVED]
How to reply. I doubt you'll ever have an automated conversion; the libraries and conventions are enough different it would make it quite difficult if not impossible.
The easiest thing to do in my experience is to create a new indicator project (eg copy movAvg_1line) -- pick a built-in indicator most like the one you are trying to convert.
Paste in the NS code at the top; select it all and then comment it out.
now, go through each line in the script, and delete any line that is not applicable (most); what you are left with is a block of text at the top that is not implemented in the new indicator
basically, that you want to plot in orange, and instructions on how to construct the moving average. Now, look below in your scratch mc.net indicator and see what you need to do to implement. Generally it is going to be really easy to see what you need to do, although some of the syntax/reserved words will be different.
After you get going if it takes you any longer than a few minutes to convert each ninjaScript I would be surprised.
The easiest thing to do in my experience is to create a new indicator project (eg copy movAvg_1line) -- pick a built-in indicator most like the one you are trying to convert.
Paste in the NS code at the top; select it all and then comment it out.
now, go through each line in the script, and delete any line that is not applicable (most); what you are left with is a block of text at the top that is not implemented in the new indicator
Code: Select all
//Add(new Plot(Color.Orange, "SMA"));
//Overlay = true;
// double last = Value[1] * Math.Min(CurrentBar, Period);
// if (CurrentBar >= Period)
// Value.Set((last + Input[0] - Input[Period]) / Math.Min(CurrentBar, Period));
// else
// Value.Set((last + Input[0]) / (Math.Min(CurrentBar, Period) + 1));
After you get going if it takes you any longer than a few minutes to convert each ninjaScript I would be surprised.
- TIKITRADER
- Posts: 84
- Joined: 17 Jun 2009
- Location: USA
- Has thanked: 55 times
- Been thanked: 13 times
Re: Converting Ninjascripts to MC.NET
Thanks rivertrader for all of your informative posts regarding mc.net
Re: Converting Ninjascripts to MC.NET
riverTrader, yes, thank you. I am encouraged by your post. I hope that in the few weeks we can see some popular NT indicators, like the aforementioned GOM Mkt Profile, come to life in MC.NET....