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-11-2018, 05:57 AM   #1
tonynt
Senior Member
 
Join Date: Jun 2009
Posts: 1,406
Thanks: 165
Thanked 31 times in 18 posts
Default compiling

Hello,


after working 9 (nine!) years with NinjaTrader I have to do this question now:

when changing in - customized - indicators code usually I can undo changes with the arrow to the left and redo with the arrow to the right.

It occurs that after compiling the both arrows are lightgray and it is not possible to use them. So I have to take notes where I made changes and change it back manually!






Thanks
Tony
Last edited by tonynt; 07-11-2018 at 05:58 AM. Reason: typing error
tonynt is offline  
Reply With Quote
Old 07-11-2018, 06:37 AM   #2
NinjaTrader_ChrisL
NinjaTrader Customer Service
 
NinjaTrader_ChrisL's Avatar
 
Join Date: Apr 2017
Location: Denver, CO
Posts: 835
Thanks: 23
Thanked 170 times in 166 posts
Default

Hello tonynt,

Thanks for the note.

The undo/redo stack is cleared after compiling in NinjaTrader 7. After testing this in NinjaTrader 8, I found that the undo/redo stack is preserved between compiles.

Please let me know if I may assist further.
Last edited by NinjaTrader_ChrisL; 07-11-2018 at 06:50 AM.
NinjaTrader_ChrisL is online now  
Reply With Quote
Old 07-11-2018, 06:50 AM   #3
tonynt
Senior Member
 
Join Date: Jun 2009
Posts: 1,406
Thanks: 165
Thanked 31 times in 18 posts
Default

Hello ChrisL,


thank you for your reply. I didnt write I use NT7.


But I do not understand from your reply because I do changes in indicators and script-strategies for years and compile and save and I can undo - if not closed NinjaTrader Scipt Editor of course in between.


What might be the reason that sometimes (or now) I can not undo even when not closed the editor after last compiling and saving.


Thanks
Tony
tonynt is offline  
Reply With Quote
Old 07-11-2018, 07:09 AM   #4
NinjaTrader_ChrisL
NinjaTrader Customer Service
 
NinjaTrader_ChrisL's Avatar
 
Join Date: Apr 2017
Location: Denver, CO
Posts: 835
Thanks: 23
Thanked 170 times in 166 posts
Default

Hello tonynt,

Thanks for the reply.

The output that I am getting is when the script is saved or compiled or saved, the undo/redo stack is cleared. I am on version 7.0.1000.38 of NinjaTrader 7. The solution for this would be to use NinjaTrader 8 because the undo/redo persists between compiles and saves.

Please let me know if I may be of any further assistance.
NinjaTrader_ChrisL is online now  
Reply With Quote
Old 07-12-2018, 07:25 AM   #5
tonynt
Senior Member
 
Join Date: Jun 2009
Posts: 1,406
Thanks: 165
Thanked 31 times in 18 posts
Default

Hello ChrisL,


thank you for your reply. So the situation is that compiling script-strategies is working as expected (you can undo and redo after compiling and savint) but with indicators one can not undo after compiling. This is the difference and I was not aware because I´m used to the script coding therefore I missed this with the indicators.


But another question at this opportunity please: for coding an indicator I need the Absolute-Number of a value (+2=2 and -2=2) and I found a thread about and a link to microsoft c# or something like this and now I have done in my indicator like


PriceRange = Math.Abs(Open[0] - Close[0]);


Is this OK please? (or missing something that will cause issues sometimes?


Best
Tony
Last edited by tonynt; 07-12-2018 at 07:28 AM. Reason: Clearifying
tonynt is offline  
Reply With Quote
Old 07-12-2018, 08:21 AM   #6
NinjaTrader_ChrisL
NinjaTrader Customer Service
 
NinjaTrader_ChrisL's Avatar
 
Join Date: Apr 2017
Location: Denver, CO
Posts: 835
Thanks: 23
Thanked 170 times in 166 posts
Default

Hello Tony,

Thanks for the reply.

That is correct. Math.Abs() is what you would need to get an absolute value.

Here is the documentation page for reference:
https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx

Please let us know if you have any questions.
NinjaTrader_ChrisL is online now  
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
Compiling Error ArbTrader Indicator Development 8 01-02-2018 01:07 AM
Compiling Indicator Widgetman Indicator Development 7 10-05-2015 08:08 AM
DrawDot not compiling jg123 Strategy Development 21 06-18-2014 10:22 AM
Error when compiling AnotherTrader Indicator Development 11 01-19-2011 03:46 PM
What does compiling do? ericgood General Development 3 02-19-2010 09:06 AM


All times are GMT -6. The time now is 01:35 PM.

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.