I want to call a form so as not to disturb multi-time frame indicators which will become skewed on indicator refresh because of the way the access historical and real time data.
I have tried to follow Folls' example, but can't seem to get beyond errors. I have attached the VisualStudio solution/project and NT NotesPanel.cs file.
I created a NotesEditor.dll in VS which I placed in the Custom folder. The NotesPanel works well so long as reference to NotesEditor are commented out, so I have ruled out a problem there.
I have added NotesEditor.dll as a reference in NT by right clicking the chart and going to references at the bottom.
I added:
using NinjaTrader.Indicator; //Not sure why this is needed
using NotesEditor;
using System.Windows.Forms;
to the declarations
The only difference in OnBarUpdate() is:
if (firstTime) //defined as true in variables. show only once
{
editNotes.Show();
firstTime = false;
// if(editNotes.DialogResult == DialogResult.OK)
{
// note1 = editNotes.textBox1.Text;
}
}
If I place:
Editor editNotes = new Editor();//Editor is name of form to be called
in variables as Folls did, I get errors galore and all my indicators blow up. So I guess this is not a good idea.
If I place it in Initialize() I get an error stating:
Failed to call method 'Initialize' for indicator 'NotesPanel': Could not load file or assembly 'NotesEditor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
and then
Failed to call method 'Initialize' for indicator '': Could not load file or assembly 'NotesEditor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
I have shut down NT and restarted and recompiled to no avail. I am about out of ideas.
Snap
Comment