NexusFi: Find Your Edge


Home Menu

 





display index number above candle


Discussion in NinjaTrader

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




 
Search this Thread

display index number above candle

  #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?
REcommedations for programming help
Sierra Chart
About a successful futures trader who didnt know anythin …
Psychology and Money Management
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
MC PL editor upgrade
MultiCharts
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
  #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


© 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