NexusFi: Find Your Edge


Home Menu

 





Indicators painted on strategy manager charts


Discussion in NinjaTrader

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




 
Search this Thread

Indicators painted on strategy manager charts

  #1 (permalink)
 
shodson's Avatar
 shodson 
OC, California, USA
Quantoholic
 
Experience: Advanced
Platform: IB/TWS, NinjaTrader, ToS
Broker: IB, ToS, Kinetick
Trading: stocks, options, futures, VIX
Posts: 1,976 since Jun 2009
Thanks Given: 533
Thanks Received: 3,709

I have a strategy that I am backtesting. When I backtest it, I get a chart with the prices and the entry and exit signals in it, but that's it. If I manually apply a template to the chart to add in the indicators I want to see it works, but once I run another backtest the indicators are gone again. Is there a way that I can have my indicators on the backtesting charts already loaded after the test is complete? Can I apply a template chart somehow in the strategy code? I don't want to duplicate all of the indicator painting code in my strategy.

BTW, I finally got my first profitable strategy up and running last night! +$13K on the Sept ES with 10 contracts 6/1 to 6/30, 43% winning trades. I was up until 5am tweaking it and the < 50% success ratio worried me. Sure enough, the next day I ran it for the June ES for the 3 months previous and it failed miserably, too many trades entering at the very end of a trend move. Now I'm tired and (virtually) broke for the rest of the day. Oh well!

I'm really not looking for any holy grail indicator/system, I just want to automate the decision-making process I go through when I trade myself, automate some of my discretionary thinking, detecting price and volume breakouts, recognizing S/R levels, filtering trades against other time-frames, etc. as well as some high probability contrarian strategies (after large, rapids moves, scalp the short-term reversal)

Once I get some more consistent results I'll post up my progress.

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Futures True Range Report
The Elite Circle
Deepmoney LLM
Elite Quantitative GenAI/LLM
Ninja Mobile Trader VPS (ninjamobiletrader.com)
Trading Reviews and Vendors
Are there any eval firms that allow you to sink to your …
Traders Hideout
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
60 thanks
Funded Trader platforms
43 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #2 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,399 since Jun 2009
Thanks Given: 33,175
Thanks Received: 101,541


shodson View Post
I have a strategy that I am backtesting. When I backtest it, I get a chart with the prices and the entry and exit signals in it, but that's it. If I manually apply a template to the chart to add in the indicators I want to see it works, but once I run another backtest the indicators are gone again. Is there a way that I can have my indicators on the backtesting charts already loaded after the test is complete? Can I apply a template chart somehow in the strategy code? I don't want to duplicate all of the indicator painting code in my strategy.

Two ways:
1) Don't use the Chart feature within Strategy Analyzer, instead apply the strategy to a normal chart (File - New Chart), right-click, Strategy, add.

or, 2) Add the lines in the #initialize section of your strategy to Add() the indicators. Read up on NT's on-line help about Add(), but basically it's:

 
Code
                            
Add(Indicator(var1var2)); 

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
 
jackyd's Avatar
 jackyd 
Calgary Canada
 
Experience: Intermediate
Platform: Ninja
Broker: IB/Kinetic
Trading: 6E, CL
Posts: 47 since Jun 2009
Thanks Given: 44
Thanks Received: 20


Another way to do it is to use the wizard to create the Add() code for you.

Just start a new strategy with the wizard, skip to the conditions screen, and build a condition with the indicator you're interested in. There's an option in the indicator settings called "Plot on chart" - set this to true. Then all you need to do is click on the View Code button and copy/past the code from the Initialize section into your custom strategy and then cancel out of the wizard.

Good luck, and may your next strategy be a profitable one!

Reply With Quote




Last Updated on July 1, 2009


© 2024 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 - Privacy Policy - Downloads - Top
no new posts