Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Problems with DrawLine
Collapse
X
-
My only solution thus far has been to completely uninstall NT (back up your Ninjascripts and then delete the NT sub-directory in 'My Documents' directory) and then reinstall NT. Once the problem reoccurred for whatever the reason and I had to repeat the above process.
-
I discovered the source of the problem but I don't know the cause.
Unfortunately I had already uninstalled and reinstalled NT. However I am able to recreate the problem. It has something to do with the Default workspace. If I delete the "Default.xml" file from the ...\Documents\NinjaTrader 6.5\workspaces folder and then restart NT the problem goes away.
Apparently this file, among other things, stores a lot of UI settings. Something must have gotten trashed in my original default.xml.
So if you experience this again. Don't uninstall NT just delete this file and the next time you run NT the issue will go away. You'll have to resave the default workspace to recreate this file.
Comment
-
a little more specific
After looking at the default.xml file from the workspaces folder and comparing it to the new one that was created when I reinstalled NT I discovered how to fix the problem without having to delete the default.xml file or reinstall NT.
The version of my default.xml file that cause the DrawLine problem contained the following snippet...
<ChartLine>
<ChartLine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<AutoScale>false</AutoScale>
<Panel>1</Panel>
<Persist>true</Persist>
<Selectable>true</Selectable>
<Time>0001-01-01T00:00:00</Time>
<Value>13.231538461538273</Value>
<EndTime>0001-01-01T00:00:00</EndTime>
<EndValue>18.127999999999822</EndValue>
<PenSerializable>
<Color>Pink</Color>
<DashStyle>Solid</DashStyle>
<Width>2</Width>
</PenSerializable>
</ChartLine>
</ChartLine>
All I had to do to fix the problem was change the <Panel>1</Panel>
to <Panel>0</Panel>, save the file and restart NT.
I have no idea how this value got set to 1 but setting it to zero fixes the issue.
Comment
-
I´ve hit the same problem with an indicator which uses DrawLine()
It stopped drawing on the chart and i was going crazy trying to fix a problem with the code which was not there.... DrawDot still working fine but DrawLine just would not plot anything
I deleted my Default.xml since it was empty anyway, restarted NT, and now i´m a happy camper again
NT team, please have a look at this
My thanks go out to j0hnth0m
Comment
-
Thanks so much for this thread. I had read it before but didn't relate to the problem. Recently I had an indicator that stopped drawing lines but DrawText() was working fine. I couldn't find any problems in the code so I changed the DrawLine() autoscale bool to true and behold, the third panel squished. All my lines were being drawn two panels down. Now after revisiting this thread I found the panel setting to be 2 in the default.xml. Strange because this was a new install of 6.5 from scratch but I never saved the workspace as another name. Saved as another workspace, deleted the default and it works. Easy fix and thanks.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by johntraderuser2, Today, 02:34 AM
|
0 responses
6 views
0 likes
|
Last Post Today, 02:34 AM | ||
Started by IanS00, 03-27-2024, 11:24 AM
|
2 responses
12 views
0 likes
|
Last Post Today, 02:00 AM | ||
Started by Mariawilcoxi, Today, 01:32 AM
|
0 responses
4 views
0 likes
|
Last Post
by Mariawilcoxi
Today, 01:32 AM
|
||
Started by gleichnerany, Today, 01:17 AM
|
0 responses
5 views
0 likes
|
Last Post
by gleichnerany
Today, 01:17 AM
|
||
Started by WHICKED, 03-27-2024, 12:33 PM
|
4 responses
47 views
0 likes
|
Last Post Today, 12:28 AM |
Comment