Go Back   NinjaTrader Support Forum > NinjaTrader 7 > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

NinjaTrader
Reply
 
Thread Tools Display Modes
Old 07-07-2017, 10:14 AM   #1
sandman
Senior Member
 
Join Date: Jun 2010
Posts: 578
Thanks: 133
Thanked 50 times in 40 posts
Default HMA as a ray

Attached is a simple indicator that draws an HMA as a ray instead of a line - from the last completed bar through the current bar. I am quite happy with it, meaning I did not experience any technical problems using it.

I would appreciate if someone from NT could look it over and/or test it to ensure there's nothing improper in the code. If fine, I'll put it up in the FileSharing Section.

sandman
Attached Images
File Type: jpg HMARay.jpg (102.3 KB, 22 views)
Attached Files
File Type: zip HMARay.zip (6.1 KB, 13 views)
sandman is offline  
Reply With Quote
Old 07-07-2017, 12:06 PM   #2
NinjaTrader_Jesse
NinjaTrader Customer Service
 
NinjaTrader_Jesse's Avatar
 
Join Date: Mar 2014
Location: Denver, CO
Posts: 4,940
Thanks: 30
Thanked 1,263 times in 1,181 posts
Default

Hello,

Thank you for the post.

I reviewed the script but I don't see anything that sticks out as wrong.

Generally, I would suggest for testing that you just test the item on each of the various bar types to ensure it plots without error, also testing at various intervals of those types too.

Outside of that, there wouldn't be much testing you could do aside from potentially calling the indicator from a strategy or using it in a strategy from the strategy analyzer.

Please let me know if I may be of further assistance.
NinjaTrader_Jesse is offline  
Reply With Quote
Old 07-09-2017, 04:20 AM   #3
sandman
Senior Member
 
Join Date: Jun 2010
Posts: 578
Thanks: 133
Thanked 50 times in 40 posts
Default

Jesse. Thank you. I have not used it as part of a strategy but using it in various bar types and intervals worked just fine.

Allow me two more questions concerning the Indicator menu - see attached image.
1. Is there a way to make the "Price marker(s)" line disappear? If so, how?
2. How can I change the labeling code concerning the line style? Currently this private bool shows "True/False". I'd like it to show "Solid/Dash".

sandman
Attached Images
File Type: jpg HMARay2.jpg (176.8 KB, 13 views)
sandman is offline  
Reply With Quote
Old 07-11-2017, 03:36 PM   #4
NinjaTrader_Jesse
NinjaTrader Customer Service
 
NinjaTrader_Jesse's Avatar
 
Join Date: Mar 2014
Location: Denver, CO
Posts: 4,940
Thanks: 30
Thanked 1,263 times in 1,181 posts
Default

Hello,

Thank you for the post.

As far as Removing existing properties, I would not be sure of a way to do this specifically.

Regarding the LineStyle, you could change this to use an Enum rather than a Boolean value which would show Words instead of True or False. We have a sample of this concept here: http://ninjatrader.com/support/forum...ead.php?t=3420

I look forward to being of further assistance.
NinjaTrader_Jesse is offline  
Reply With Quote
The following user says thank you to NinjaTrader_Jesse for this post:
Old 05-15-2018, 07:11 PM   #5
skillrive
Junior Member
 
Join Date: May 2018
Posts: 1
Thanks: 0
Thanked 0 times in 0 posts
Default uiu

thx real nice bro
skillrive is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why not HMA(Open instead of HMA(HMA(Open, ConvertToInt32(0) joemiller Strategy Development 4 04-24-2017 01:20 PM
HMA stratgey iyad737 Platform Technical Support 4 09-23-2012 01:48 AM
HMA Indicator SharonSS Platform Technical Support 2 08-21-2012 04:22 PM
Hma shapper Indicator Development 1 05-05-2009 06:34 AM
HMA indicato nicko9 Indicator Development 1 09-21-2006 03:25 AM


All times are GMT -6. The time now is 03:04 AM.

Futures, foreign currency and options trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. View Full Risk Disclosure.

CFTC Rules 4.41 - Hypothetical or Simulated performance results have certain limitations, unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

This website is hosted and operated by NinjaTrader, LLC (“NT”), a software development company which owns and supports all proprietary technology relating to and including the NinjaTrader trading platform. NT is an affiliated company to NinjaTrader Brokerage (“NTB”), which is a NFA registered introducing broker (NFA #0339976) providing brokerage services to traders of futures and foreign exchange products. This website is intended for educational and informational purposes only and should not be viewed as a solicitation or recommendation of any product, service or trading strategy. No offer or solicitation to buy or sell securities, securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, is made, given, or in any manner endorsed by any NT affiliate and the information made available on this Web site is not an offer or solicitation of any kind. Specific questions related to a brokerage account should be sent to your broker directly. The content and opinions expressed on this website are those of the authors and do not necessarily reflect the official policy or position of NT or any of its affiliates. 

Vendors along with their websites, products and services, collectively referred to as (“Vendor Content”), are independent persons or companies that are in no manner affiliated with NT or any if its affiliates. NT or any of its affiliates are not responsible for, do not approve, recommend or endorse any Vendor Content referenced on this website and it’s your sole responsibility to evaluate Vendor Content. Please be aware that any performance information provided by a vendor should be considered hypothetical and must contain the disclosures required by NFA Rule 2-29(c). If you are interested in learning more about, or investigating the quality of, any such Vendor Content you must contact the vendor, provider or seller of such Vendor Content. No person employed by, or associated with, NT or any of its affiliates is authorized to provide any information about any such Vendor Content.