NexusFi: Find Your Edge


Home Menu

 





import levels from txt file and draw horizontal lines


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Maxin with 5 posts (3 thanks)
    2. looks_two rlan214 with 3 posts (0 thanks)
    3. looks_3 mrchengan with 3 posts (3 thanks)
    4. looks_4 jayawog400 with 3 posts (0 thanks)
      Best Posters
    1. looks_one TigerStripes with 7 thanks per post
    2. looks_two mrchengan with 1 thanks per post
    3. looks_3 bobwest with 1 thanks per post
    4. looks_4 Maxin with 0.6 thanks per post
    1. trending_up 2,606 views
    2. thumb_up 18 thanks given
    3. group 9 followers
    1. forum 19 posts
    2. attach_file 7 attachments




 
Search this Thread

import levels from txt file and draw horizontal lines

  #1 (permalink)
mrchengan
austin texas
 
Posts: 17 since May 2021
Thanks Given: 6
Thanks Received: 11

Hi I am not much of a programmer, I like to import levels from a text file and draw them as horizontal lines on the chart itself. It should be something similar to futures.io/ local_links.php?linkid= 994 but I can't access the file. I can't link to it either since I am new. Can someone help me out?

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Cheap historycal L1 data for stocks
Stocks and ETFs
What broker to use for trading palladium futures
Commodities
ZombieSqueeze
Platforms and Indicators
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
 
  #2 (permalink)
mrchengan
austin texas
 
Posts: 17 since May 2021
Thanks Given: 6
Thanks Received: 11

Thank you so much for taking your time and posting the files! I actually was able to create something real simple that draws the lines but I will check it out. Thanks again!

Reply With Quote
  #3 (permalink)
 rlan214 
Detroit MI
 
Experience: None
Platform: NT8
Trading: ES
Posts: 4 since Aug 2020
Thanks Given: 1
Thanks Received: 0


newb question did anyone get this to wokr?

Reply With Quote
  #4 (permalink)
 
Maxin's Avatar
 Maxin 
Raleigh NC
 
Experience: Intermediate
Platform: TOS Ninjatrader
Trading: Futures
Posts: 9 since Dec 2022
Thanks Given: 4
Thanks Received: 3

I use it everyday, works great

Reply With Quote
  #5 (permalink)
 rlan214 
Detroit MI
 
Experience: None
Platform: NT8
Trading: ES
Posts: 4 since Aug 2020
Thanks Given: 1
Thanks Received: 0

does the filename of the text file have to follow a certain syntax or location? i think i got syntax correct on the text file i mean i just have numbers
I did load the txt file that came with it and it won't even show in the databox

Reply With Quote
  #6 (permalink)
 
Maxin's Avatar
 Maxin 
Raleigh NC
 
Experience: Intermediate
Platform: TOS Ninjatrader
Trading: Futures
Posts: 9 since Dec 2022
Thanks Given: 4
Thanks Received: 3

Nothing special, just a .txt file


Here is an example of one I use saved as ES Levels.txt
I keep them in the Ninjatrader 8 folder

// PRICE1 PRICE2 @Opacity #Color "Text Label" // Commentary


06/26/2023

4386 4386 "Inflection PT Flush below and recover to long" #green
4374 4374 "Major" #green
4361
4353 4353 "Major"
4340 4340 "Major"
4327
4317 4317 "Major"

4394 4395 "reclaim here goes higher"

Reply With Quote
Thanked by:
  #7 (permalink)
 rlan214 
Detroit MI
 
Experience: None
Platform: NT8
Trading: ES
Posts: 4 since Aug 2020
Thanks Given: 1
Thanks Received: 0

looks like something drew after ninja restart i guess the question is that do I have to have the date?

Reply With Quote
  #8 (permalink)
 
Maxin's Avatar
 Maxin 
Raleigh NC
 
Experience: Intermediate
Platform: TOS Ninjatrader
Trading: Futures
Posts: 9 since Dec 2022
Thanks Given: 4
Thanks Received: 3

Yes, every day you want to see your levels needs to be listed in the text file, they don't carry over and you can't list a range of dates.
Sometimes with Sundays night or holidays you won't list todays date, use the next day. A little trial and error you'll see what I mean

Sent using the NexusFi mobile app

Reply With Quote
Thanked by:
  #9 (permalink)
mrchengan
austin texas
 
Posts: 17 since May 2021
Thanks Given: 6
Thanks Received: 11


rlan214 View Post
looks like something drew after ninja restart i guess the question is that do I have to have the date?

Like you I thought it was too cumbersome, I made something simple and you just need to dump your levels in there 1 per line. I don't use it anymore and haven't use it for a while, take a look at the source code. You will need to put the levels.txt in your ninjatrader directory or modify the source file. Once you add the indicator it will read the txt file and paint the levels. Every day or each time you want to re-paint the levels, you need to remove the indicator and add it back. I can't remember if it will actually label the levels with number, I think it doesn't so you will need to find another indicator to automatically label all the horizontal lines.

Attached Files
Elite Membership required to download: aLevels.zip
Reply With Quote
Thanked by:
  #10 (permalink)
 Fripi 
Brussels Belgium
 
Experience: Beginner
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: Futures
Posts: 41 since May 2023
Thanks Given: 21
Thanks Received: 25



Maxin View Post
Nothing special, just a .txt file


Here is an example of one I use saved as ES Levels.txt
I keep them in the Ninjatrader 8 folder

// PRICE1 PRICE2 @Opacity #Color "Text Label" // Commentary


06/26/2023

4386 4386 "Inflection PT Flush below and recover to long" #green
4374 4374 "Major" #green
4361
4353 4353 "Major"
4340 4340 "Major"
4327
4317 4317 "Major"

4394 4395 "reclaim here goes higher"


Also doesn't seem to work here, is there anything wrong with that way of typing it ?

 
Code
// PRICE1 PRICE2 @Opacity #Color "Text Label" // Commentary

10/19/2023

4314	@50	#DodgerBlue
4302	@80	#DodgerBlue
4292	@50	#DodgerBlue
4373	4375	@80	#OrangeRed	"Bearish Reversal Zone"
4385	@50	#OrangeRed
4394	@80	#OrangeRed
Must I use 2 tabs where only 1 price is given ?

Reply With Quote




Last Updated on January 31, 2024


© 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