Hi, I have gotten curious about MC.net mainly because I know VBA (visual basic for applications) much better than I know PowerLanguage and secondly because MC.net has a debugger. So here are two questions.
Q1: Does the MC.net use the backward reference to tables as the MC power language does. To me this backwards reference of tables is a stroke of genius in thinking for traders and I have gotten use to it even after many years of thinking of forward reference as a regular programmer.
Q2: Is there a documentation guide for converting regular MC power language scripts over to MC.net scripts. Maybe I should be open minded and ask the reverse question
If MC.net does use a backwards reference to tables I guess it would make sense to download MC.net for a month (time permitting) to compare original MC built in scripts to MC.net scripts as a learning tool.
John
Making moving from MC to MC.net easier
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Making moving from MC to MC.net easier
I don't know what a 'backward reference table' is and how it compares to a 'forward reference'. But the PowerLanguage .NET Editor does have a 'Help Contents' tab with basic information about the code elements like a reference would have:Q1: Does the MC.net use the backward reference to tables as the MC power language does. To me this backwards reference of tables is a stroke of genius in thinking for traders and I have gotten use to it even after many years of thinking of forward reference as a regular programmer.
To my knowledge there isn't such a guide.Q2: Is there a documentation guide for converting regular MC power language scripts over to MC.net scripts. Maybe I should be open minded and ask the reverse question
Re: Making moving from MC to MC.net easier
Thanks JoshM. Your picture helps me get an idea of what .net is all about. It is a programming concept for sure. I realize this since I saw a lot of this when I learned to program websites 2 years ago.
Backwards reference is my terminology actually. It means that the subscript (or index if you will) points from the end of the table to the back of the table rather than from the beginning of the table to the end of the table. In other words [X] means X number of bars back, It makes perfect sense for traders since we are on the current bar at all times (the real time bar). Did you notice I said WE For we traders everything should relate to this real time bar (the last bar on the chart). So I can simplify the question to this "Does MC.net have a close[2] function that means get the close 2 bars back from the current real time bar?".
By the way, I suspect that Close[2] is a function that has an algorithm built in that converts the backward reference in the traders mind to a forward reference to a rolling table in the programming world. The table rolls around the MaxBarsBack size. It is a theory. The MC programmers would know if I am correct. I would really love to hear one say "Hey John, you nailed it"
Backwards reference is my terminology actually. It means that the subscript (or index if you will) points from the end of the table to the back of the table rather than from the beginning of the table to the end of the table. In other words [X] means X number of bars back, It makes perfect sense for traders since we are on the current bar at all times (the real time bar). Did you notice I said WE For we traders everything should relate to this real time bar (the last bar on the chart). So I can simplify the question to this "Does MC.net have a close[2] function that means get the close 2 bars back from the current real time bar?".
By the way, I suspect that Close[2] is a function that has an algorithm built in that converts the backward reference in the traders mind to a forward reference to a rolling table in the programming world. The table rolls around the MaxBarsBack size. It is a theory. The MC programmers would know if I am correct. I would really love to hear one say "Hey John, you nailed it"
Last edited by bowlesj3 on 23 Jul 2017, edited 1 time in total.
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Making moving from MC to MC.net easier
Oh I see. Yes MultiCharts .NET does have backwards reference. For instance, `Bars.Close[2]` returns the closing price from 2 bars ago, `Bars.High[10]` the price from 10 bars ago, and `BarsOfData(2).Low[5]` would give the low price 5 bars ago for the second data series.Backwards reference is my terminology actually. It means that the subscript (or index if you will) points from the end of the table to the back of the table rather than from the beginning of the table to the end of the table. In other words [X] means X number of bars back, It makes perfect sense for traders since we are on the current bar at all times (the real time bar). Did you notice I said WE For we traders everything should relate to this real time bar. So I can simplify the question to this "Does MC.net have a close[2] function that means get the close 2 bars back from the current real time bar?".
How MultiCharts and MultiCharts .NET work with MaxBarsBack size -- and any other MultiCharts feature for that matter -- is exactly the same. So there's nothing new to learn there luckily.The table rolls around the MaxBarsBack size.
If you already know Visual Basic, then you "only" have to learn how MultiCharts .NET maps to MultiCharts. Like that `Bars.Close[1]` gives the closing price of the previous bar, instead of just `Close[1]` as we use in PowerLanguage.
(I put the "only" in quotes because there's of course a learning curve that can be difficult at times, and I don't want to downplay that. But if you already know the programming language and the MultiCharts platform, you have a big advantage over people completely new to MultiCharts .NET.)
Re: Making moving from MC to MC.net easier
Hi JoshM.
Thanks so much for explaining that. It sounds like it might not be too hard to convert my old MC code to MC.net code. I guess there is no actual guide for converting code. It is simple and you just created it Having said that it would be cool to have a utility that took a shot at it. I am getting lazy in my old age A grumpy old man grumping about debugging with those print statements...lol.
Regarding learning curve I am crazy enough to have learned various amounts of 17 programming languages so I might just be crazy enough to learn another one
John
Thanks so much for explaining that. It sounds like it might not be too hard to convert my old MC code to MC.net code. I guess there is no actual guide for converting code. It is simple and you just created it Having said that it would be cool to have a utility that took a shot at it. I am getting lazy in my old age A grumpy old man grumping about debugging with those print statements...lol.
Regarding learning curve I am crazy enough to have learned various amounts of 17 programming languages so I might just be crazy enough to learn another one
John