![]() |
|
|||||||
| Charting Support for NinjaTrader Advanced Charting. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Nov 2007
Location: Michigan, USA
Posts: 116
Thanks: 1
Thanked 0 times in 0 posts
|
It appears that autoscale is always set to true when drawing a horizontal line even if false is specified...
Code:
protectedoverridevoid Initialize()
{
CalculateOnBarClose = true;
Overlay = true;
PriceTypeSupported = false;
}
protectedoverridevoid OnBarUpdate()
{
DrawHorizontalLine("line1", false, Close[0], Color.Blue, DashStyle.Solid, 2);
}
Last edited by hemlock; 05-04-2009 at 11:59 AM.
|
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
I am not getting the behavior you described. I get a line drawn at Close[0] which is expected. As I scroll back the line does not stay in view because AutoScale = false.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Nov 2007
Location: Michigan, USA
Posts: 116
Thanks: 1
Thanked 0 times in 0 posts
|
That's odd. It may have something to do with the 'default' for manually drawn lines. Try setting the default to autoscale=true for a manually drawn horz line and then try the script again.
Last edited by hemlock; 05-04-2009 at 12:19 PM.
|
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
hemlock,
No difference. Manually draw lines should not influence your code. Please ensure you have no other indicators/draw objects on the chart that may give the illusion your line is on AutoScale = true when set to false.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Nov 2007
Location: Michigan, USA
Posts: 116
Thanks: 1
Thanked 0 times in 0 posts
|
Josh,
Hmmm, not true here. Preparation: 1. Close and restart NinjaTrader version 6.5.1000.9. 2. Close all NT windows except Control Center. 3. Connect to Interactive Brokers. Test #1: 1. Open ES 5 minute chart using default template (price bars and VOL only) 2. Press F6 to manually draw horizontal line. 3. Double click on horizontal line to edit properties. 4. Turn autoscale ON, click apply, click "set default". 5. Delete manually drawn line. 6. Add indicator kpTest3 (see attached). 7. Double click on script generated horizontal line. Autoscale is set to true (should not be). 8. Close chart. Test #2: 1. Open ES 5 minute chart using default template (price bars and VOL only) 2. Press F6 to manually draw horizontal line. 3. Double click on horizontal line to edit properties. 4. Turn autoscale OFF, click "apply", click "set default". 5. Delete manually drawn line. 6. Add indicator kpTest3 (see attached). 7. Double click on script generated horizontal line. Autoscale is set to false (correct). 8. Close chart. |
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
We will look into it. Thank you.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Thank you for bringing this up. It will be addressed in a future version.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| DrawHorizontalLine | xewoox | General Programming | 1 | 01-29-2009 08:33 AM |
| Turning off AutoScale using a custom indicator | Newton | Charting | 1 | 01-14-2009 01:10 PM |
| DrawHorizontalLine | bobmike | General Programming | 4 | 09-09-2008 05:02 PM |
| Autoscale on Horizontal Line | chantj | General Programming | 6 | 03-26-2008 10:15 AM |
| DrawText AutoScale property no longer works | Rollins | Historical NinjaTrader 6.5 Beta Threads | 4 | 02-25-2008 05:36 AM |