NexusFi: Find Your Edge


Home Menu

 





NT8 Strategy draw HorizontalLine on Chart


Discussion in NinjaTrader

Updated
    1. trending_up 2,862 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 hyperscalper 
boise idaho
 
Experience: Advanced
Platform: NinjaTrader C# Custom
Broker: NinjaTrader LeeLoo Rithmic
Trading: Nasdaq Futures NQ/MNQ
Posts: 315 since Apr 2020
Thanks Given: 15
Thanks Received: 541

Hi.

Can't figure out how a Strategy draws a HorizontalLine
on a host Chart.

Indicators seem to do so easily; but I can't
find anything for a Strategy.

Maybe there is no HorizontalLine; just Line and
I need to specify from and to coordinates...? That
might be it. But HorizontalLine is supposed to exist,
although I think it may be NT7 documentation, miscategorized
as NT8 documentation here:
https://ninjatrader.com/support/helpGuides/nt8/?draw_horizontalline.htm

Anybody got a simple code snippet?

hyperscalper


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
My Rant with AMP Futures
Trading Reviews and Vendors
AI for Traders — Agents, Memory, Tools & Real-Worl …
Elite Quantitative GenAI/LLM
[WTS] ATAS Lifetime ULTRA license – EU buyers only – …
Platforms and Indicators
Bitcoin’s 2022 low, 2025 high and 2026 low so far arou …
Cryptocurrency
No book, only a stair: journaling fills where price move …
Cryptocurrency
 
  #2 (permalink)
 
Jasonnator's Avatar
 Jasonnator 
Denver, Colorado United States
 
Experience: Intermediate
Platform: NT8 + Custom
Broker: NT Brokerage, Kinetick, IQFeed, Interactive Brokers
Trading: ES
Posts: 158 since Dec 2014
Thanks Given: 40
Thanks Received: 167

Drawing tools are the same between indicators and strategies because both use the NinjaTrader.NinjaScript.DrawingTools namespace.

documentation with numerous examples.


Reply With Quote
  #3 (permalink)
 hyperscalper 
boise idaho
 
Experience: Advanced
Platform: NinjaTrader C# Custom
Broker: NinjaTrader LeeLoo Rithmic
Trading: Nasdaq Futures NQ/MNQ
Posts: 315 since Apr 2020
Thanks Given: 15
Thanks Received: 541



Jasonnator View Post
Drawing tools are the same between indicators and strategies because both use the NinjaTrader.NinjaScript.DrawingTools namespace.

documentation with numerous examples.

Yeah, that's what I thought; until I couldn't figure it out. Indicators seem to be
much more prevalent; but nobody has yet shown me a Strategy that does
it.
hyperscalper


Started this thread Reply With Quote
  #4 (permalink)
 hyperscalper 
boise idaho
 
Experience: Advanced
Platform: NinjaTrader C# Custom
Broker: NinjaTrader LeeLoo Rithmic
Trading: Nasdaq Futures NQ/MNQ
Posts: 315 since Apr 2020
Thanks Given: 15
Thanks Received: 541

PROBLEM RESOLVED

This was a Development Environment override of the Draw function
in Visual Studio, by a "partial class" definition in the namespace
NinjaTrader.NinjaScript.DrawingTools which did not have
Draw.HorizontalLine defined, of course; in my local Documents
filesystem.

So, it's a Visual Studio Dev environment unintended class override
which was making it impossible to see the Draw.HorizontalLine

Ya learn something every day !!! I'm a Java programmer with Eclipse;
and haven't spent the required years with Visual Studio C# !!

hyperscalper


Started this thread Reply With Quote




Last Updated on October 8, 2020


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts