NexusFi: Find Your Edge


Home Menu

 





display index number above candle


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
lakersfan
Los Angeles, CA
 
Posts: 5 since Apr 2020
Thanks Given: 1
Thanks Received: 0

Hi, i'm coding for ninjatrader 7, and want to know how to put the index number above the candle.

So far, i've got

int index = Count - CurrentBar;
DrawText("tag"+CurrentBar.ToString(), true, index.ToString(), 0, High[0], 30, Color.Orange, hFont, StringAlignment.Center, Color.Transparent, Color.Transparent, 0);


This works when I place the indicator, but then keeps printing "0" to each candle as if that was the index number. It looks as though the indicator only works when initializing.


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
My funded futures (mffu)
Funded Trading Evaluation Firms
Using multiple Versions of the same DLL in MC.Net
MultiCharts
Historical Price History?
Elite Algorithmic NinjaTrader Trading
How to look up market depth?
MultiCharts
Forex Factory News - Weekly XML Export
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Algo automated / semi-automated trading anyone?
22 thanks
Statistical Arbitrage trading/market neutral strategies
13 thanks
Any good traders on YouTube?
12 thanks
Tariffs and what comes next...
5 thanks
Daytrading ES & NQ
4 thanks
  #2 (permalink)
 asfax 
Prague, Czech Republic
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: NQ
Posts: 57 since Sep 2009
Thanks Given: 34
Thanks Received: 79

Hi @lakersfan,
in my opinion, it is not a good idea to use DrawText() to index bars for performance reasons. Try attached indicator instead...


Attached Files
Elite Membership required to download: asfBarIndex.zip
Reply With Quote
Thanked by:




Last Updated on April 27, 2020


© 2025 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