NexusFi: Find Your Edge


Home Menu

 





NT8 : User drawn box on chart with mouse


Discussion in NinjaTrader

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




 
Search this Thread

NT8 : User drawn box on chart with mouse

  #1 (permalink)
 
Popsicle's Avatar
 Popsicle 
Pretoria Gauteng
 
Experience: Intermediate
Platform: Sierra Charts
Trading: NQ
Posts: 250 since May 2016
Thanks Given: 2,448
Thanks Received: 550

Hi,

Does anyone maybe have any ideas, even general direction would be awesome, for allowing a user to draw a box with their mouse on a chart in NT8? I wrote code that will draw a box between two price bars if the user clicks on the first bar and then the second. I would like to adapt this code to do the following:

The user clicks somewhere on the chart and drags his mouse while holding in the left mouse button to draw a box around a set of price bars. When the user releases the left mouse button, that would be the user defined box.

My biggest problem at this point is the normal chart behavior that when a user left clicks on the chart and moves their mouse, the chart pans left and right. Not sure if this can be disabled in code for the period that the box is drawn.

I am developing this specifically for NT8. Any help or advice would be greatly appreciated.

Popsicle

Follow me on Twitter Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Deepmoney LLM
Elite Quantitative GenAI/LLM
Are there any eval firms that allow you to sink to your …
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
GFIs1 1 DAX trade per day journal
18 thanks
The Program
18 thanks
  #3 (permalink)
 
ratfink's Avatar
 ratfink 
Birmingham UK
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: TST/Rithmic
Trading: YM/Gold
Posts: 3,633 since Dec 2012
Thanks Given: 17,423
Thanks Received: 8,425



Popsicle View Post
Hi,

Does anyone maybe have any ideas, even general direction would be awesome, for allowing a user to draw a box with their mouse on a chart in NT8? I wrote code that will draw a box between two price bars if the user clicks on the first bar and then the second. I would like to adapt this code to do the following:

The user clicks somewhere on the chart and drags his mouse while holding in the left mouse button to draw a box around a set of price bars. When the user releases the left mouse button, that would be the user defined box.

My biggest problem at this point is the normal chart behavior that when a user left clicks on the chart and moves their mouse, the chart pans left and right. Not sure if this can be disabled in code for the period that the box is drawn.

I am developing this specifically for NT8. Any help or advice would be greatly appreciated.

Popsicle

Surely it's one of the built-in drawing tools? It is in 7.

Travel Well
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
 
Popsicle's Avatar
 Popsicle 
Pretoria Gauteng
 
Experience: Intermediate
Platform: Sierra Charts
Trading: NQ
Posts: 250 since May 2016
Thanks Given: 2,448
Thanks Received: 550

Thanks @ratfink. Unfortunately I need more control over the drawn box in terms of the bars it spans etc. I think you gave me an idea though, thank you very much. Will try it out.

Popsicle


Sent from my iPhone using NexusFi mobile app

Follow me on Twitter Started this thread Reply With Quote
Thanked by:
  #5 (permalink)
 
ratfink's Avatar
 ratfink 
Birmingham UK
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: TST/Rithmic
Trading: YM/Gold
Posts: 3,633 since Dec 2012
Thanks Given: 17,423
Thanks Received: 8,425


Popsicle View Post
Thanks @ratfink. Unfortunately I need more control over the drawn box in terms of the bars it spans etc. I think you gave me an idea though, thank you very much. Will try it out.

Popsicle

Ok, cool. Be good to have people involved in these areas. In NT7 there is a lot of stuff around to help with capturing low-level events and using direct graphics, so it will be good to see some NT8 equivalents as well.

Cheers

Travel Well
Visit my NexusFi Trade Journal Reply With Quote
  #6 (permalink)
 
Popsicle's Avatar
 Popsicle 
Pretoria Gauteng
 
Experience: Intermediate
Platform: Sierra Charts
Trading: NQ
Posts: 250 since May 2016
Thanks Given: 2,448
Thanks Received: 550

Thanks @ratfink for putting me on the right track. For those interested in doing something similar, it is now possible in NT8 to provide your own custom drawing tool. In NT7 this was quite a mission but they made it very easy in NT8.

I will be using the built in Rectangle drawing tool and writing a custom drawing tool to extend it with the functionality I need. The following Ninjatrader support forum post is an awesome place to start if this is something you want to do.

Custom Drawing Tool - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

Follow me on Twitter Started this thread Reply With Quote
Thanked by:




Last Updated on September 26, 2016


© 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