NexusFi: Find Your Edge


Home Menu

 





Any LUCK on drawing tool code help?


Discussion in NinjaTrader

Updated
    1. trending_up 2,890 views
    2. thumb_up 10 thanks given
    3. group 2 followers
    1. forum 8 posts
    2. attach_file 0 attachments




 
Search this Thread

Any LUCK on drawing tool code help?

  #1 (permalink)
 hector24 
austin, texas
 
Experience: Intermediate
Platform: ninja trader
Trading: currency futures
Posts: 506 since Jan 2011
Thanks Given: 14
Thanks Received: 234

Does anyone know how to code a drawing tool for Ninja that could be helpful to everyone. I am looking for a line that will project out to the right from the point of control from my cursor. I would like to click the bottom or top of a candle or anywhere on my chart, then the line would come up automatically, from that point and to the right. I would like for the Ray line to just plot from spot to right horizontally to have the instrument price indicated on the Ray line labeled. It would be really nice also if I could have a button on my screen that I could just click and start drawing my lines and stay on until I unable it. Any help would be appreciated. This would sure save time. Right now with the Ninja Ray line you have to adjust it in order for it to line up horizontally. The Horizontal tool is kind of confusing for me for what I am trying to mark. Also the Swing indicator plots automatically and I want to choose from what bottom or top to plot from. Any help would be appreciated.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Deepmoney LLM
Elite Quantitative GenAI/LLM
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Better Renko Gaps
The Elite Circle
 

  #2 (permalink)
pfabcTrader
Leicester England
 
Posts: 35 since Apr 2012
Thanks Given: 2
Thanks Received: 23

Hi,

here is a simple method using a macro ( works perfect for me).

// Macro Scheduler 11

// NT7 Ray Line
Press F3

GetCursorPos>X,Y

// Ray Start position
LClick

// X = X+100
Add>X,100

// Ray Second Position
MouseMove>X,Y

// Draw Ray
LClick

Or use free AutoHotkey .

I have a dedicated trading keyboard for single key execution.

Reply With Quote
  #3 (permalink)
 hector24 
austin, texas
 
Experience: Intermediate
Platform: ninja trader
Trading: currency futures
Posts: 506 since Jan 2011
Thanks Given: 14
Thanks Received: 234



pfabcTrader View Post
Hi,

here is a simple method using a macro ( works perfect for me).

// Macro Scheduler 11

// NT7 Ray Line
Press F3

GetCursorPos>X,Y

// Ray Start position
LClick

// X = X+100
Add>X,100

// Ray Second Position
MouseMove>X,Y

// Draw Ray
LClick

Or use free AutoHotkey .

I have a dedicated trading keyboard for single key execution.

PF, really appreciate it. Is this for Ninja? I see you use Multicharts. If so where do I install this code at and how. Sorry I know nothing about coding or writing script but I think I can do this one if guided.

Thanks
Hector

Started this thread Reply With Quote
  #4 (permalink)
pfabcTrader
Leicester England
 
Posts: 35 since Apr 2012
Thanks Given: 2
Thanks Received: 23

Hi,

The sample macro script is for controlling Ninja7 keys and mouse.
You need to get a macro, I use the Macro Scheduler for all my work
but the free AutoHotkey will work but I have not used it.

Download AutoHotkey and play with it.

Reply With Quote
  #5 (permalink)
 hector24 
austin, texas
 
Experience: Intermediate
Platform: ninja trader
Trading: currency futures
Posts: 506 since Jan 2011
Thanks Given: 14
Thanks Received: 234


pfabcTrader View Post
Hi,

The sample macro script is for controlling Ninja7 keys and mouse.
You need to get a macro, I use the Macro Scheduler for all my work
but the free AutoHotkey will work but I have not used it.

Download AutoHotkey and play with it.

PF sorry to bother you but where do I get the Macro Scheduler.

Thanks
Hector

Started this thread Reply With Quote
  #6 (permalink)
pfabcTrader
Leicester England
 
Posts: 35 since Apr 2012
Thanks Given: 2
Thanks Received: 23

Hi,

here is the AutoHotKey version.

Install AutoHotKey
Copy the text into NotePad and save as yourName.ahk
DoubleClick on the file yourName.ahk
Your macro is now ready for execution, you will see an H icon in the task bar.
Go to Ninja Chart and move mouse to your line starting point and press
the Shift r key. works for me!

( No need for Macro Scheduler )

----------------------------------------------------------------------------------------------------

+r:: ; Shift R ,Hot Key to execute script

Send {F3} ; Ninja Ray Draw

MouseGetPos, xpos, ypos

MouseClick, left, xpos, ypos

MouseClick, left, xpos + 100, ypos

return


-------------------------------------------------------------------------------------------------------

Reply With Quote
  #7 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,392 since Jun 2009
Thanks Given: 33,171
Thanks Received: 101,530

@monpere has a ton of fantastic autohotkey scripts here that automate a lot of tasks for NinjaTrader:



Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #8 (permalink)
 hector24 
austin, texas
 
Experience: Intermediate
Platform: ninja trader
Trading: currency futures
Posts: 506 since Jan 2011
Thanks Given: 14
Thanks Received: 234


pfabcTrader View Post
Hi,

here is the AutoHotKey version.

Install AutoHotKey
Copy the text into NotePad and save as yourName.ahk
DoubleClick on the file yourName.ahk
Your macro is now ready for execution, you will see an H icon in the task bar.
Go to Ninja Chart and move mouse to your line starting point and press
the Shift r key. works for me!

( No need for Macro Scheduler )

----------------------------------------------------------------------------------------------------

+r:: ; Shift R ,Hot Key to execute script

Send {F3} ; Ninja Ray Draw

MouseGetPos, xpos, ypos

MouseClick, left, xpos, ypos

MouseClick, left, xpos + 100, ypos

return


-------------------------------------------------------------------------------------------------------

Thanks PF. If I may, can you look at this image of my chart with a sample that I was looking for.
Maybe I should have put this in the first post. I did install your code and it quite does not look
like what I am looking for. Is there any way to adjust it to look like the sample attached and is
there anyway to get this on a button on my chart that I can just click to activate hit.

ray sample - hector24's library

Thanks
Hector

Started this thread Reply With Quote
  #9 (permalink)
pfabcTrader
Leicester England
 
Posts: 35 since Apr 2012
Thanks Given: 2
Thanks Received: 23

Hi,
My chart looks like yours, disable Snap Mode otherwise you will sometimes get a slope line.

I'm new to Ninja and don't know how to integrate a button into a chart.
I solved that problem by attaching a second USB-keyboard (or Number Pad)
and allocate each macro-script to a single key.

PF

Reply With Quote





Last Updated on December 9, 2012


© 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