Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Single-click order entry on chart
Collapse
X
-
-
Hello NTTrader33,
LeftMouseDown is part of the scripts code, if you want to find out why the script is pricing the orders as you described then you would have to look into the code being used in that script. The orders in that sample use the same price so if you wanted to offset them from each other you would have to edit the code so it uses different prices for each order.
The files attached to forum posts are generally just samples of programming concepts, the sample that you are using wouldn't be intended for actual trading but just to show how to get a price using mouse coordinates and then use it. You would have to look at the code and learn the concepts that it shows if you wanted to make something similar of your own.
For stuck orders you can reset the sim account to clear those. https://ninjatrader.com/support/help...01_account.htm
Comment
-
How do I access the code in this script? What is the function of the offset setting in the indicator? If I had been trading live, would I potentially get the orange stuck orders? If so, how would I reset the live account?Originally posted by NinjaTrader_Jesse View PostHello NTTrader33,
LeftMouseDown is part of the scripts code, if you want to find out why the script is pricing the orders as you described then you would have to look into the code being used in that script. The orders in that sample use the same price so if you wanted to offset them from each other you would have to edit the code so it uses different prices for each order.
The files attached to forum posts are generally just samples of programming concepts, the sample that you are using wouldn't be intended for actual trading but just to show how to get a price using mouse coordinates and then use it. You would have to look at the code and learn the concepts that it shows if you wanted to make something similar of your own.
For stuck orders you can reset the sim account to clear those. https://ninjatrader.com/support/help...01_account.htm
Comment
-
Hello NTTrader33,
You can use the NinjaScript editor to edit the scripts that you import.
A live trade would not get stuck like that, that only happens on the sim account. I would not suggest using the attached script on a live account as mentioned that is not intended for actual trading but is just an example of a programming concept.
Comment
-
What would make a script based on that example any more appropriate for live trading than the attached one?Originally posted by NinjaTrader_Jesse View PostHello NTTrader33,
You can use the NinjaScript editor to edit the scripts that you import.
A live trade would not get stuck like that, that only happens on the sim account. I would not suggest using the attached script on a live account as mentioned that is not intended for actual trading but is just an example of a programming concept.
Comment
-
Hello NTTrader33,
That would depend on what your goals are, you would need to adjust it as needed to match your goals. The script uses the same price for the two orders that are submitted so if your goal is not specifically that then you would have to modify it to be how you wanted instead.
That script is intended to demonstrate a few concepts such as finding an account using the addon framework, using order events, using mouse coordinates and converting mouse coordinates to a price. It does not do anything else like offset the orders or place them in a logical way that would be used for normal trading, its just meant to show off those programming concepts so that you can re use those concepts later in your own scripts.
I would never suggest using a sample script from the forum or user app share to trade on a live account, I would only suggest to use scripts that you personally created and have fully tested to trade live so that you know exactly what is happening with the logic.
- Likes 1
Comment
-
Hi Chris,
Thank you for sharing. This indicator could use a qualifier key so that not all mouse clicks on the chart are recorded as entries.
Also, is there a newer version that allows any entries to take on the properties of the prevailing ATM strategy?
Thanks again.
Originally posted by NinjaTrader_ChrisL View PostHello darkbluedove , thanks for your post.
This is possible in NinjaScript. I attached an example indicator that will submit a limit order at the price when you click the mouse. To detect if a keyboard key is pressed you can use IsKeyDown.
Edit: I noticed you have questions on the ChartTrader settings. You need to use the WPF Automation ID to get the correct object. There is an example of the idea here. The same concept applies for the other ChartTrader elements. You can look for the automation ID of a WPF object by using inspect.exe
Please let me know if you have any questions on this material.
Comment
-
I came across a solid solution! people from mascapital uk has a free Chart Click Trader available for download. I've been testing it, and it’s straightforward to set up and use.
If anyone’s interested, link: https://www.mascapital.uk/free-indic...ninjatrader-8/
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
605 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
351 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
560 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
561 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment