I have an indicator that I purchased. Its name is “Dt Dom Bricks Catcher” and the file name is “DtDomBricksCatcher.dll”.
As you can see in the image, this indicator displays a number inside a red or green box below or above the candles on the chart when a large order above a certain lot size appears. In the image, you can also see the small settings window where this indicator is configured.
What I would like is this: for example, when a buy or sell order above 100 lots appears, I want to see this number and its color in real time in the NinjaScript Output window.
Someone will correct me if I’m wrong - I’m not a programmer - and you may know more than I - but you can’t do anything with a .dll. Unless what you’re after is to somehow take the output which draws the indicator output and code an indicator which takes that .DLL output to do what you want.
Otherwise, back to the creator for a custom version
Yes, what I want to do is take the output generated by the indicator from the .DLL file and write a new indicator that uses that output.
Specifically, I want to receive real-time notifications on my phone via the Pushover app whenever the indicator displays numbers greater than 100 lots on the screen.
I don’t have experience with NinjaScript. Could you help me with this?
I don’t want to access the indicator’s code. I want to access the output generated by the indicator and displayed on the chart. I want to use that output to send a notification to my phone.
You may want to contact the developer of the indicator and ask them about accessing the output from their indicator programatically. Usually, and perhaps you might not have looked at this, but the indicator that you bought, if it was adequately coded, the values should be accessible to you via ninjaScript, Alerts, and and the data box.
To confirm if you can get access to the output, open up a chart, right click, and click on data box. All the indicators and their values should show in the data box. If the values from your indicator isn’t showing in the data box, then the indicator hasn’t been built in a way whereby users can programmatically access the indicator values, and perhaps you can ask the indicator developer to update the software.
Additionally, you could take a picture of the indicator, provide all the documentation of the indicator to Gemini, and ask it to replicate the indicator, so that you have a similar indicator, where about you have access to the code because you wrote it with the help of Gemini artificial intelligence. When you’re using Gemini, if you decide to go down that path, you’ll want to use version 2.5 pro
I’m not 100% sure, but it might be possible to access the values. The idea is to programmatically create the instance of the indicator and then you might be able to access the values with something like indicator[0]. What I would do is set breakpoints to see what can be accessed from the instance.
#Maverick’s helpful suggestion re: DataBox - a simple ‘add’ to this knowledge, to say: isn’t this an ‘option’ (which may, or not, be Default) I.e. if not in DataBox it ‘could’ be because not being displayed, not because it can’t be/be accessed?
Another possibility - see if you can add it to/as a Market Analyzer column & if so access the output there?
As mentioned, something like this is much easier added by original coder.
Looks like your dealing w/draw objects, and those are not likely exposed.
Complicated w/dll, but ChartScale.ChartObjects.CollectionChanged might work.
On CollectionChanged Add Event, run check for your drawobject type and tag.
(Hopefully originator used standardized naming convention for tag names)
//Example Adding CollectionChanged Event from OnState = State.DataLoaded
if (ChartControl != null)
{
int csccAdd = 0;
foreach (ChartScale cs in ChartControl.ChartPanels.Where(x => x != null).SelectMany(cp => cp.Scales))
{
csccAdd++;
Print("Subscribing to ChartScale.ChartObjects.CollectionChanged = " + csccAdd);
cs.ChartObjects.CollectionChanged += OnChartObjectsChanged;
}
}
//Example Removing CollectionChanged Event from OnState = State.Terminated
if (ChartControl != null)
{
int csccDel = 0;
foreach (ChartScale cs in ChartControl.ChartPanels.Where(x => x != null).SelectMany(cp => cp.Scales))
{
csccDel++;
Print("Un-Subscribing to ChartScale.ChartObjects.CollectionChanged = " + csccDel);
cs.ChartObjects.CollectionChanged -= OnChartObjectsChanged;
}
}
//Example ChartScale.ChartObjects.CollectionChanged Event
private void OnChartObjectsChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add && e.NewItems[0].GetType().Namespace == "NinjaTrader.NinjaScript.DrawingTools")
{
dynamic cssdt = e.NewItems[0];
if(cssdt != null && !cssdt.IsUserDrawn) Print(cssdt.GetType().ToString() + " " + cssdt.Tag.ToString())
}
}