Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Drawing tools: create lines with alerts
Collapse
X
-
Hello,
For anyone interested in performing this conversion, you can refer to our Code Breaking Changes page of the Help Guide for a guide on converting NinjaTrader 7 scripts to NinjaTrader 8.
Code Breaking Changes - https://ninjatrader.com/support/help...ng_changes.htm
We would like to encourage the community to share their conversions on our User App Share.
Submissions can be made here: https://ninjatrader.com/support/foru...app-submission
If you are interested in NinjaScript Consulting services to have a script converted at your request, please let us know and we can have an EcoSystem representative reach out with more information.
We look forward to assisting.
-
There use to be a Ninjatrader 7 addon that used to do that but im not a programmer too so... But if you can upgrade the program to Ninja 8 would be awesome. Source (https://ninjatrader.com/support/foru...ine-is-crossed).Attached Files
Leave a comment:
-
Hello nostrasladamus,
Thanks for your post.
These methods pick up on when the left mouse button is pressed to a down position and is returned to an up position. I have attached a clone of the Lines Drawing Tool that has most of the code removed and has prints added so you can observe how the code gets processed and get a better idea on how the Drawing Tool works. The Mouse states are typically used to transverse through DrawingStates and to place anchors.
OnRender is used to actually draw the line or object. You can reference our SampleCustomRender example and the documentation below for further information on SharpDX rendering.
Using SharpDX for custom rendering - https://ninjatrader.com/support/help..._rendering.htm
We look forward to assisting.Attached Files
Leave a comment:
-
Hi,
Maybe then I could set the alert under "OnMouseDown" void, or under "OnMouseUp" void?
What is done in each of these voids?
And what is done in the "OnRender" one?
I've done some dwg tools, but copying the existing ones, and I would be very nice if you could send me here some help
Leave a comment:
-
Thanks Jim
It sounds very interesting
I'll try to follow your recommendations (I'm not an expert programmer
Leave a comment:
-
Hello nostrasladamus,
If you are programming your own Drawing Tool, and would like to have the Drawing Tool fire alerts automatically, you could use the AddOn code for firing Alerts. Please see below.
In order to access price data from the Drawing Tool, you can use GetAttachedToPriceBars. This will return a ChartBars object which will then allow you to access the Bars object within ChartBars.
From here, you can use (GetAttachedToChartBars().Bars.GetClose(BarIndex) to get the close at a given index. As an example, the following print will print the current Close value on the chart.
Print(GetAttachedToChartBars().Bars.GetClose(GetAt tachedToChartBars().Bars.Count-1));
This logic would then be implemented in the Drawing Tools OnRender method. Be advised, OnRender will process each time the chart needs to update. We will see frequent calls to OnRender when the user interacts with the chart to scroll it or change the scale. We normally would not suggest baking the alerts into the Drawing Tool for this reason, but if you intend on doing this, I strongly suggest using logic that checks if the price changes before checking the logic to fire your alert.
Let us know if you have any additional questions.
Leave a comment:
-
Thanks,
Do you mean, if I programm my own drawing tool, I can set an alert inside my drawing tool code?
Where can I find info about programming alerts?
Leave a comment:
-
nostrasladamus,
Thanks for replying.
This would require custom programming. Programmed alerts can be set with a drawing tool by default, but normal chart alerts cannot be set up by default with a Drawing tool.
Leave a comment:
-
Thanks for your answer,
I knew this.
My question is, if it is possible, to include some instructions in the drawing tool, so that the alert will be created athomatically:
Imagine I draw a Fibonacci retracement, and I have implemented an alert so, that when the price crosses the 50% retracement it sends an alert.
And this is done only with picking two points of the chart from the fibonacci drawing tool..... (because I always send the same alert ...
Leave a comment:
-
nostrasladamus,
Thanks for posing.
In NinjaTrader 8, you can use the native Alerts feature to trigger alerts based on items on the chart, such as drawing tools. Alerts can be configured using certain conditions within the platform to display a pop-up message, play a sound, trigger an order, etc. More information at the below link:
We also have comprised a video going over some Alerts examples at the below publicly available link:
Leave a comment:
-
Drawing tools: create lines with alerts
Hi,
Is it possible to create some lines with Drawing tools, and that some of these created lines have an alert?
Thks!Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by rjbtrade1, 11-30-2023, 04:38 PM
|
2 responses
77 views
0 likes
|
Last Post
by DavidHP
Today, 08:12 AM
|
||
Started by Stanfillirenfro, Today, 07:23 AM
|
3 responses
13 views
0 likes
|
Last Post Today, 09:14 AM | ||
Started by FitSpressoHonest, Today, 09:14 AM
|
0 responses
4 views
0 likes
|
Last Post Today, 09:14 AM | ||
Started by Davide999, 05-18-2023, 03:55 AM
|
4 responses
557 views
1 like
|
Last Post
by kcwasher
Today, 09:08 AM
|
||
Started by rexsole, Today, 08:39 AM
|
2 responses
9 views
0 likes
|
Last Post Today, 09:06 AM |
Leave a comment: