A little help for my friends Simple Code problem - futures io
futures io futures trading



A little help for my friends Simple Code problem


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one cory with 1 posts (0 thanks)
    2. looks_two deandavis with 1 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 iantg with 1 posts (1 thanks)
    1. trending_up 547 views
    2. thumb_up 1 thanks given
    3. group 3 followers
    1. forum 3 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

A little help for my friends Simple Code problem

(login for full post details)
  #1 (permalink)
Poulsbo, Wa US
 
Experience: Intermediate
Platform: NinjaTraderm Tradestation
Broker: Ninja Trader, Continuum
Trading: ES, CL
 
deandavis's Avatar
 
Posts: 21 since Jul 2010
Thanks: 72 given, 4 received

I am attempting to rename a Bar Type and have run into a problem
Here is what I have done

I have made a copy of a NT provided Bar Type and am changing its name
All of this was done with the NT Editor
I made the following changes to the code
Within the NT editor I changed its name to MoesCustomBarType
Within the file I changed the Public Class to MoesCustomBarsType
and replaced every instance of the words Original BarType name to MoesCustom
I compile without error.
I restarted NT and tried to open a new chart with the new BarType. But it is not listed.

I receive no errors on screen and there are no errors in the log file.
I reopen the Editor and now there are 2 errors.
The errors read
NinjaTrader Custom.Resource 'does not contain a definition for 'NinjaScriptBarsTypeMoesCustom'
'NinjaTrader Data BarsPeriodType' does not contain a definition for 'MoesCustom'
And the errors point to these lines of code
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Name = Custom.Resource.NinjaScriptBarsTypeMoesCuston ;
BarsPeriod = new BarsPeriod { BarsPeriodType = BarsPeriodType.MoesCustom };
DaysToLoad = 3;

}
else if (State == State.Configure)
{
switch (BarsPeriod.BaseBarsPeriodType)
Can anyone give me a hand and direct me to a solution??
Thanks
Dean

Started this thread Reply With Quote

Journal Challenge February 2021 results:
Competing for $1500 in prizes from Topstep
looks_oneSBtrader82 's Trading Journalby SBtrader82
(173 thanks from 31 posts)
looks_twoJust BEING a Trader: Letting Go!!by iqgod
(120 thanks from 33 posts)
looks_3Wisdom is Emptinessby Mtype
(68 thanks from 25 posts)
looks_4Deetee’s DAX Trading Journal (time based)by Deetee
(35 thanks from 17 posts)
looks_5Journal for peanuts1956by peanuts1956
(23 thanks from 13 posts)
 
 
(login for full post details)
  #3 (permalink)
the coin hunter
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
 
cory's Avatar
 
Posts: 6,029 since Jun 2009
Thanks: 845 given, 7,893 received


there is more than just changing bar name; example of unirenko NT8
 
Code
		protected override void OnStateChange()
		{
			if (State == State.SetDefaults)
			{
				Description							= @"Universal renko bar type. Ported by Sim22, 2015. simterann22@gmx.com";
				Name								= "UniRenko";
				BarsPeriod							= new BarsPeriod { BarsPeriodType = (BarsPeriodType) 501, BarsPeriodTypeName = "UniRenkoBarsType(501)", Value = 1 };
				BuiltFrom							= BarsPeriodType.Tick;
				DaysToLoad							= 3;
				IsIntraday							= true;
			}
			else if (State == State.Configure)
			{
				Properties.Remove(Properties.Find("BaseBarsPeriodType",			true));
				//Properties.Remove(Properties.Find("BaseBarsPeriodValue",		true));
				Properties.Remove(Properties.Find("PointAndFigurePriceType",	true));
				Properties.Remove(Properties.Find("ReversalType",				true));
				
				SetPropertyName("Value", "Tick Trend");
				SetPropertyName("Value2", "Tick Reversal");
				SetPropertyName("BaseBarsPeriodValue",  "Open Offset");
				
				Name = "UniR T" + BarsPeriod.Value +"R" + BarsPeriod.Value2; // +"O" + BarsPeriod.BaseBarsPeriodValue;
				/// I kept the UI name short b/c as of NT8b6 the name space at the toolbar is very short. You would not see the values. Sim22.
			}
		}

Reply With Quote
 
(login for full post details)
  #4 (permalink)
charlotte nc
 
Experience: Master
Platform: ninjatrader
Broker: NinjaTrader
Trading: Emini (ES, YM, NQ, ect.)
 
Posts: 398 since Jan 2015
Thanks: 76 given, 1,081 received

I can at least explain the exact error you hit.

If you type NinjaTrader.Custom.Resource. at this point after the (dot) you should see a window pop up with all the available options that you can select that belong to the NinjaTrader.Customer.Resource class. If you then type something that does not exist within this, you will hit this error message. So it sounds like whatever it is that you are building, you need to get it into this class.

Here are a few links to get you started:

https://ninjatrader.com/support/forum/showthread.php?t=97592
https://ninjatrader.com/support/forum/showthread.php?t=93289
https://ninjatrader.com/support/forum/showthread.php?t=84486

Ian


deandavis View Post
I am attempting to rename a Bar Type and have run into a problem
Here is what I have done

I have made a copy of a NT provided Bar Type and am changing its name
All of this was done with the NT Editor
I made the following changes to the code
Within the NT editor I changed its name to MoesCustomBarType
Within the file I changed the Public Class to MoesCustomBarsType
and replaced every instance of the words Original BarType name to MoesCustom
I compile without error.
I restarted NT and tried to open a new chart with the new BarType. But it is not listed.

I receive no errors on screen and there are no errors in the log file.
I reopen the Editor and now there are 2 errors.
The errors read
NinjaTrader Custom.Resource 'does not contain a definition for 'NinjaScriptBarsTypeMoesCustom'
'NinjaTrader Data BarsPeriodType' does not contain a definition for 'MoesCustom'
And the errors point to these lines of code
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Name = Custom.Resource.NinjaScriptBarsTypeMoesCuston ;
BarsPeriod = new BarsPeriod { BarsPeriodType = BarsPeriodType.MoesCustom };
DaysToLoad = 3;

}
else if (State == State.Configure)
{
switch (BarsPeriod.BaseBarsPeriodType)
Can anyone give me a hand and direct me to a solution??
Thanks
Dean


In the analytical world there is no such thing as art, there is only the science you know and the science you don't know. Characterizing the science you don't know as "art" is a fools game.
Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to iantg for this post:


futures io Trading Community Platforms and Indicators NinjaTrader > A little help for my friends Simple Code problem


Last Updated on June 28, 2018


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Journal Challenge w/$1500 prizes from Topstep!

February
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Call Option Buying: The New Pain Trade? w/Carley Garner

Elite only
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts