Looking for typical way to create a 'DataBox' on Price Panel - NinjaTrader Programming | futures io social day trading
futures io futures trading


Looking for typical way to create a 'DataBox' on Price Panel
Updated: Views / Replies:3,559 / 15
Created: by forrestang Attachments:4

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 4  
 
Thread Tools Search this Thread
 

Looking for typical way to create a 'DataBox' on Price Panel

  #1 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received

Looking for typical way to create a 'DataBox' on Price Panel

I'm creating an indicator, that so far just needs to display various information on the price panel.

If I had maybe 3-4 variables I would like to output to the screen, what would be a good way to do this? I would like to use a function that would somehow keep it together, so that when resizing bars or scrunching the chart together, all of the values do not get too close to each other, or loose their spacing.

If anyone knows of an indicator that has done this (I can't think of any), that might get me started as well.

Might look something like this pic.

Forrest

Attached Thumbnails
Looking for typical way to create a 'DataBox' on Price Panel-prime2011-07-25_061115.png  
Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received


I'm working with "DrawTextFixed("tag1", "shout", TextPosition.TopRight);" function now. So far does most of want I want.

Playing with it to see if I can get it organized on the charts the way that I want now.

Reply With Quote
 
  #4 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received

Got it!

Just need to figure out how to round these numbers off. Then some formatting.

Attached Thumbnails
Looking for typical way to create a 'DataBox' on Price Panel-prime2011-07-25_100246.png  
Reply With Quote
 
  #5 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received

Wow!!! What are the odds?

I just had a power outage right as I was hitting the compile button.

My PC restarts, open the chart up, and the study still works.

But.... when I went to edit the strategy, there is NOT one line of code. This is frustrating. I don't know if I'm going to recreate this damn thing again?

Reply With Quote
 
  #6 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received

LOL..... Damn!

And here are some pics showing the script running RIGHT NOW! I don't think I can recover anything. I have a post on ninja forums, I'm hoping there is some magical directory somewhere that may have captured something?

Attached Thumbnails
Looking for typical way to create a 'DataBox' on Price Panel-errir.png   Looking for typical way to create a 'DataBox' on Price Panel-errir2.png  
Reply With Quote
 
  #7 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,220 received

Check Round2TickSize (if I remember correctly) for easy rounding. You can also append .ToString("0.00") to the end of a variable to reformat it to two decimals for example.

As for your computer crash, check your temp folder location and check your NinjaTrader folder --- it likely creates a temp file and renames it once compiled. The compiled code is cached in the DLL it creates which is why it still works.

I am not sure where temp files are stored, you might have to check with NT support if not in your %temp% Windows path.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #8 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received


Big Mike View Post
Check Round2TickSize (if I remember correctly) for easy rounding. You can also append .ToString("0.00") to the end of a variable to reformat it to two decimals for example.

As for your computer crash, check your temp folder location and check your NinjaTrader folder --- it likely creates a temp file and renames it once compiled. The compiled code is cached in the DLL it creates which is why it still works.

I am not sure where temp files are stored, you might have to check with NT support if not in your %temp% Windows path.

Mike

I asked those guys over @ ninjaForums about the crash earlier and possible recovery from somewhere, and they told me I was SOL. I recreated my indicator, and *LUCKILY* since I was getting some help from @Fat Tails about referencing his indie, I had some code snippets I posted that allowed me to recreate the script rather quickly. Otherwise it would have taken me a bit longer. I guess that's why I typically post a lot as I am scripting so that I have a point of reference to help my thought process.

And about that crash.... what are the odds? Think about it, the only reason my code disappeared was b/c my script was compiling while the computer turned off. If I had gone to hit that compile button 3 seconds earlier, or 3 seconds later, my code wouldn't have disappeared. I could have heard a noise, or dropped the remote to my radio, or gotten a phone call, or browsed an interesting topic on a web browser, or received an email that I decided to open that what have caused a delay. What are the freaking odds?!?!?!

For the rounding, I wound up using the ROUND function I guess that is native to C# not a ninja type function. I wound up going with this:

 
Code
			//Round these numbers 
			skew[0] = Math.Round(skew[0], 4);
			stdDevSize[0] = Math.Round(stdDevSize[0], 4);
			skewPercent[0] = Math.Round(skewPercent[0], 2);

Reply With Quote
The following user says Thank You to forrestang for this post:
 
  #9 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,220 received

Instrument.Round2TickSize is what I was thinking before.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following user says Thank You to Big Mike for this post:
 
  #10 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary



forrestang View Post
Wow!!! What are the odds?

I just had a power outage right as I was hitting the compile button.

My PC restarts, open the chart up, and the study still works.

But.... when I went to edit the strategy, there is NOT one line of code. This is frustrating. I don't know if I'm going to recreate this damn thing again?

When you code an indicator you have several options.

-> If it is half ready, you cannot compile it, but you can save it via F4. In this case it will still be there after a power outage.
-> Once you have terminated your work you can compile via F5.

Now, the problem is there if you do not finish your work. NinjaTrader will try to compile it and you will get a compiler error. For this case I have created a subdirectory WorkInProgress in My Documents \ NinjaTrader 7\ bin\Custom\Indicator folder. I simply drag the indicator into that directory and later retrieve it to continue my work.

Reply With Quote
The following 3 users say Thank You to Fat Tails for this post:

Reply



futures io > > > > > Looking for typical way to create a 'DataBox' on Price Panel

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Databox bukkan NinjaTrader Programming 10 December 16th, 2016 09:38 AM
plot without DataBox baberg NinjaTrader Programming 5 August 15th, 2011 06:36 PM
Arrows not plotting on price panel kendallw4 NinjaTrader Programming 2 June 28th, 2011 03:44 PM
Draw on both Price & Indicator Panel NT7? Wessel NinjaTrader Programming 12 July 15th, 2010 09:41 AM
Need help to create an up/down arrow in panel 1(price/candle area) alex123 NinjaTrader Programming 3 September 28th, 2009 07:06 PM


All times are GMT -4. The time now is 08:04 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-12 in 0.13 seconds with 20 queries on phoenix via your IP 54.234.255.29