NexusFi: Find Your Edge


Home Menu

 





How do I test an edited indicator code without applying changes to the original?


Discussion in NinjaTrader

Updated
    1. trending_up 1,640 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
sra18376
kansas city, ks
 
Posts: 17 since Jun 2014
Thanks Given: 0
Thanks Received: 5

I am still new to NT and I am trying to edit some code on an indicator I downloaded. I am aware that in this process I could make a fatal mistake, so I want to still have the original code intact in case this happens. When I try to make a copy of the original code and Save As with a different name for editing practice, NT wont let me compile to test it. How do I test my modifications to the downloaded ninjascript without permanently changing the original? Thanks


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Iran Lebanon Problem Kills Switzerland Talks, Brent at $ …
Prediction Markets & Event Contracts
Thanks Mike. Godspeed.
The Elite Circle
Ninjatrader users - good CONNECTIONs post and article fr …
NinjaTrader
Datafeed for Atas
Platforms and Indicators
Czechia Live at 52.5% as England Rides 4-2 Wave to Co-Fa …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Want your NinjaTrader indicator created, free?
5 thanks
Afternoon-close session
1 thanks
Franks Trading Journey
1 thanks
Denied 20K payouts: Alpha Futures
1 thanks
FootPrintV2 Chart for NT8
1 thanks
  #2 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,117


sra18376 View Post
I am still new to NT and I am trying to edit some code on an indicator I downloaded. I am aware that in this process I could make a fatal mistake, so I want to still have the original code intact in case this happens. When I try to make a copy of the original code and Save As with a different name for editing practice, NT wont let me compile to test it. How do I test my modifications to the downloaded ninjascript without permanently changing the original? Thanks

You need to save the indicator under a new name via "Save as .... ".

However, in some cases you need to make further changes before compiling. For example this would be the case, if your indicator contains a global object such as an enum. In that case you will need to rename the enum. Make sure that you replace the enum every time when it is called in the code.

If you still cannot fix it, please let us know which indicator you talk about.


Reply With Quote
  #3 (permalink)
sra18376
kansas city, ks
 
Posts: 17 since Jun 2014
Thanks Given: 0
Thanks Received: 5


What is an example of an Enum from the priceactionswing indicator?


Reply With Quote
  #4 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,117


sra18376 View Post
What is an example of an Enum from the priceactionswing indicator?

The indicator uses public enums "BarType", "Relation", "SwingLengthTypes", "VisualizationTypes", "SwingVolumeTypes", SwingTimeTypes". "SwingDurationTypes" and "SwingTypes".

Search the code for "enum" and you will find them.

All of them need to be replaced with enums with different names, both where they are defined and where they are called within the code.


Reply With Quote




Last Updated on June 18, 2014


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts