View Full Version : Doublema
trader1512
05-19-2009, 10:14 AM
i am trying to change the indicator DOUBLEMA posted by Josh to a VWMA.
i get the following compile error:
the type name VWMAType does not exist in the type 'NinjaTraderIndicatorVWMA
cany you point me in the right direction.
NinjaTrader_Bertrand
05-19-2009, 10:26 AM
trader1512, the code in our sharing section is provided 'as is' and unfortunately we don't offer custom coding services. For those you would need to contact a NinjaScript consultant - http://www.ninjatrader.com/webnew/partners_onlinetrading_NinjaScript.htm
As a tip, you would need to add the new MAType to the MAV method that the DoubleMA calls.
trader1512
05-19-2009, 10:44 AM
i find this canned response to questions to be quite frustrating. vwma is a standard indicator and all i am trying to do is replace one ma with another. why does that generate a go elsewhere response.
NinjaTrader_Bertrand
05-19-2009, 10:53 AM
trader1512, unfortunately we don't have the bandwidth to debug custom indicators - the DoubleMA was a study posted on the forum that Josh posted to the sharing section for general future reference.
But I think the change you requested is already done in this one that was posted also to the sharing section just recently - http://www.ninjatrader-support2.com/vb/local_links.php?action=jump&id=196&catid=1
trader1512
05-19-2009, 11:07 AM
unfortunately that indicator tries to replace mutliple indicators in your directories. I dont understand your response. the message is asking for a valid location to use the VWMA. this just doesnt seem to be a lengthy and time consuming response. just provide the proper directory location
NinjaTrader_Josh
05-19-2009, 11:18 AM
trader1512,
We do not know how these custom indicators are programmed and cannot comment on when and where you can use things created by them. As such, we suggest you try and contact the original author for assistance on this.
trader1512
05-19-2009, 11:22 AM
i would do that except the indicator link bertrand sent just goes to a download process. it does not point to the indicator on the support site.
my original issue was, how do i change the ema to wvma in the double ma indicator you posted.
NinjaTrader_Josh
05-19-2009, 11:25 AM
As Bertrand mentioned, that is not our indicator. You need to contact the original author.
trader1512
05-19-2009, 11:59 AM
http://www.ninjatrader-support2.com/...id=196&catid=1
this is what bartrand provided. it does not point to a location it initiates the download process.
where is the location this points to.
Who is the original author of the doublema indicator that YOU have posted.
sefstrat
05-19-2009, 12:11 PM
get the new doubleMA posted by ctrlbrk.. it has vwma in it already.
trader1512
05-19-2009, 12:34 PM
thanks. difficult to get very far without your help.
NinjaTrader_Bertrand
05-19-2009, 11:04 PM
Good morning - to clarify, the link I provided points to a script in our sharing section - this includes already the needed modifications to the DoubleMA you need, so you can review the code and go from there.
Here's the general sharing section link - http://www.ninjatrader-support2.com/vb/local_links.php?catid=1
To start developing custom NinjaScript indicators, please check into those tutorials, they should provide a good start - http://www.ninjatrader-support.com/HelpGuideV6/Overview18.html
trader1512
05-20-2009, 07:09 AM
good morning back. original question was because the doublema i downloaded was posted by Josh so i thought i was asking a question of the developer as you guys recommend.
the original link you sent me just executed and didnt allow me to virus scan the file. thats why i was asking for the actual file location not just the link to execute.
another trader pointed me to the script location so i could download it to a directory prior to unzipping. i run any indicator i download through a virus scan prior to opening it.
i am currently reviewing the tutorials and am doing ok. i found that by developing a strategy you can convert it to an indicator with little modifications and that is a great learning tool.
i also open up existing code to evaluated techniques and as long as you understand the variables and properties section needing to be opened and modified you can build off of that.
thanks for your response, i hope this clarifies. have a great day!
NinjaTrader_Josh
05-20-2009, 07:32 AM
As Bertrand mentioned, the code is NOT our code. Please see the description category in the file sharing section for each post to see who the original author is.
ctrlbrk
05-29-2009, 11:53 AM
Edit the MAV.cs indicator, there are three sections if memory serves you need to add the new Jurik JMA. Under #variables, under onbarupdate there is a case/switch, and under parameters.
It should be fairly obvious how to do so from there. Remember Jurik has more than just Input and Period, there is another component something like Phase, so you'll need to provide that as a static value in the syntax because DoubleMA isn't built to have that as an extra variable without more code change.
Mike
WhoKnows
05-30-2009, 04:12 AM
Couple of questions:
- Is there a reason why PriceTypeSupported is set to "false"? (In DoubleMA.cs line 59 and MAV.cs line 65). Enabling it to true gives some extra options to 'shift' the averages as you can use Open and Close as input ... but you may have had a specific reason to put it on false.
- I first thought the selection of MA was handled in MAType.cs, but apparently it is in the MAV.cs. Is that MAType.cs still needed?
- Looking at MAV.cs I get confused (looking at the parts commented out I think this has been some work in progress).
I am no programmer :() but trying to learn via analyzing the code of others. As I read it this file first started with a public enum MAType (line29-59). I thought the numbers after the MAType refered to the cases in 78-92 via the command 'switch'... however the numbers do not correspond to the ordering of the cases. And the section with cases is also commented out.
In line 105-147 under OnBarUpdate a new range of options is given via if .. else if ..statements.And that list is replicated under properties (194-261).
As I wanted to add TEMA I added this in both lists. Is it important that the order in these lists is the same?
After the compiler complained I also added 'TEMA=16' under public enum.
Apparently it works, but what does this =16 do when it does not refer to anything in a list?
Anyway, thanks to the programmers ... it sure helps to get smoothing.
ctrlbrk
06-10-2009, 05:51 AM
Couple of questions:
- Is there a reason why PriceTypeSupported is set to "false"? (In DoubleMA.cs line 59 and MAV.cs line 65). Enabling it to true gives some extra options to 'shift' the averages as you can use Open and Close as input ... but you may have had a specific reason to put it on false.
No reason I can think of, should be supported but have not tested.
- I first thought the selection of MA was handled in MAType.cs, but apparently it is in the MAV.cs. Is that MAType.cs still needed?
No that was a mistake on my end. Keeping track of all these individual add-ons to indicators for enum lists and etc is a pain, especially when their naming convention has nothing in common with the base indicator. I will strive to clean that up if I do another release of DoubleMA. Remember, I am not original author.
- Looking at MAV.cs I get confused (looking at the parts commented out I think this has been some work in progress).
Just nuke the commented out stuff. There are three places you need to modify the code if you want to add indicators, and you need to maintain the order. #varliables, you need to modify the enum integer list. #onbarupdate, and #parms.
I am no programmer :() but trying to learn via analyzing the code of others. As I read it this file first started with a public enum MAType (line29-59). I thought the numbers after the MAType refered to the cases in 78-92 via the command 'switch'... however the numbers do not correspond to the ordering of the cases. And the section with cases is also commented out.
They should correspond. I just looked at mine, they match up. Are you sure, maybe I missed something when I was editing. If they don't match correctly then when you select "ZeroLagEMA" from the list you may be getting a "HMA" or who knows what.
As I wanted to add TEMA I added this in both lists. Is it important that the order in these lists is the same?
After the compiler complained I also added 'TEMA=16' under public enum.
Apparently it works, but what does this =16 do when it does not refer to anything in a list?
The 16 needs to match the enum and case list for TEMA or whatever. Also keep in mind some indicators "output" result is very different, so you have to keep this in mind. You can still use DoubleMA to just color any MA, just select the one MA and set the second one to None. But when you combine to MA's you need to keep in mind their differences.
Mike