Mukaddim
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Coding Help Needed
Collapse
X
-
Hello Mukaddim,
Thank you for your note.
1. NinjaTrader.Indicator == NinjaTrader.NinjaScript.Indicators
2. NinjaTrader.Gui.Design is not documented, perhaps you can provide more information on what you’re trying to do, where you’re calling it, and I will try to provide some guidance.
3. NinjaTrader.Strategy; == NinjaTrader.NinjaScript.Strategies
4. Not documented need more info.
5. Not documented need more info.
6. Not documented need more info.
7. https://ninjatrader.com/support/help...-us/?plots.htm
8. https://ninjatrader.com/support/help...font_class.htm
There is not an official indicator/strategy converter which takes scripts from NT7 and converts them to NT8 however on the forum there is a post which provides script for conversion.
I’d like to mention its best to do a manual conversion for accuracy as not all scripts are simple enough to be converted directly.
Also below I’ve provided a link to code breaking changes which you should consider when converting your scripts:
I look forward to your reply.Alan P.NinjaTrader Customer Service
-
Thank you AlanP, Will provide you the snippets for undocumented ones. I am doing the manual conversion. The conversion script gives me an error which I asked about here https://ninjatrader.com/support/forum/newreply.php?do=newreply&p=543775, unfortunately it prodeced nothing for me.
Comment
-
Originally posted by Mukaddim View PostHello,
Could anyone please let me know the NT8 equivalents of the following NT7 namespace/statements/declarations?
1. NinjaTrader.Indicator;
2. NinjaTrader.Gui.Design;
3. NinjaTrader.Strategy;
4.Data.BarsType.Supported.Length;
5.BarsType.GetInstance(type).DisplayName;
6.Class MyClass: BarData
7.base.Plots[0].Pen.Width = 3f;
8.Font TextFont = new Font("Arial", 8f, FontStyle.Bold);
I'm trying to convert NT7 indicators to NT8 ones. Your assistance is highly appreciated.
Rubel
4. & 5.
private MyPeriodTypeSupported()
{
this.miAddIndicator = this.AddPeriodMethodInfo(typeof(IndicatorBase));
this.miAddStrategy = this.AddPeriodMethodInfo(typeof(StrategyBase));
this.dictionaryPeriodTypes = new Dictionary<string, PeriodType>
(BarsType.Supported.Length);
foreach (PeriodType type in BarsType.Supported)
{
try
{
string displayName = BarsType.GetInstance(type).DisplayName;
this.dictionaryPeriodTypes.Add(displayName, type);
}
catch (Exception)
{
}
}
}
6.
namespace NinjaTrader.Gui.Chart
{
public class MyBarsDataPeriod : BarsData
{
protected PropertyDescriptorCollection adjustedProps;
private BarsPeriodType previousId = PeriodType.Minute;
private static ExpandableObjectConverter cv = BarsDataConverter;
}
Appreciate your help
Mukaddim
Comment
-
Originally posted by Mukaddim View PostI'm trying to convert NT7 indicators to NT8 ones. Your assistance is highly appreciated.
Comment
-
Originally posted by bltdavid View PostThis thread might help get you started,
https://ninjatrader.com/support/foru...ad.php?t=79551
It gives me the following error. Any work around the issue?
Thanking
Mukaddim
Comment
-
Originally posted by NinjaTrader_AlanP View PostHello Mukaddim,
So I may best answer your questions, it would be helpful if you could provide a use case for each example as there may be a different/better approach to achieving what you’re looking to do in NT8.
I look forward to your reply.
What do I have to do? I'm trying to convert a .cs class file that is required for a set of indicators. So would you like to look at the NT7 code for it?
Thanking
Mukaddim
Comment
-
Originally posted by Mukaddim View PostHi, Thanks for pointing out to the conversion script.
It gives me the following error. Any work around the issue?
Originally posted by Mukaddim View PostWhat do I have to do? I'm trying to convert a .cs class file that is required for a set of indicators. So would you like to look at the NT7 code for it?
If you are comfortable posting your .cs class file here, I'll try to convert it with the above conversion script and see how far I can get.
Comment
-
Originally posted by Mukaddim View PostHi, Thanks for pointing out to the conversion script.
It gives me the following error. Any work around the issue?
Whenever you get an error message like this, copy & paste the entire error message (or most of it) into Google search, you'd be surprised what Google will turn up.
For example, Google found this,
In other words, treat arcane error messages as research questions and start Googling & then read anything that turns up. Sounds simple, but this tip is not completely obvious, it wasn't obvious to me until I saw a colleague do it. Give it a try!
Good luck!
Comment
-
Hi bltdavid,
Can we skype to do the sharing? I can't post in that conversion thread, no idea why. I posted the error details in another thread. It didn't turn up any fruitful solutions, since it's undocumented.
Thanks for your guidance, Appreciate it.
Mukaddim
Comment
-
Hello Mukaddim,
There would not be enough information to determine what that error is.
Converting customer code is out of the scope of NinjaScript support however if you’d like I could have someone from our business development team pass over a list of third party developers that you could contact about debugging your code.
The following link on conversion may be of interest to you,
Please let us know if you need further assistance.Alan P.NinjaTrader Customer Service
Comment
-
No worries AlanP, thanks for your responses. Would you please tell me what the following error means and the way to solve it? Can't find any documentation on it.
int barsAgo = iBar - sPoints.bOfHigh;
HighDot.Set(barsAgo, sPoints.hPoint); //on NT7 is converted to
HighDot[0] = (barsAgo, sPoints.hPoint); //on NT8
It gives errors with codes CS1026, CS1525, CS1002 along with "; expected", ")
expected". It also gives a red squiggly under the COMMA after barsAgo. The codes
doesn't provide enough info on solving the error, have no clue what might be the
issue.
Any assistance will be highly appreciated.
Thanking,
MukaddimLast edited by Mukaddim; 06-20-2018, 08:08 AM.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by rbeckmann05, Yesterday, 06:48 PM
|
1 response
12 views
0 likes
|
Last Post
by bltdavid
Today, 05:43 AM
|
||
Started by llanqui, Today, 03:53 AM
|
0 responses
6 views
0 likes
|
Last Post
by llanqui
Today, 03:53 AM
|
||
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
10 views
0 likes
|
Last Post Today, 12:38 AM | ||
Started by AaronKoRn, Yesterday, 09:49 PM
|
0 responses
15 views
0 likes
|
Last Post
by AaronKoRn
Yesterday, 09:49 PM
|
||
Started by carnitron, Yesterday, 08:42 PM
|
0 responses
11 views
0 likes
|
Last Post
by carnitron
Yesterday, 08:42 PM
|
Comment