NinjaScript dash style switch - futures io
futures io futures trading



NinjaScript dash style switch


Discussion in NinjaTrader

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




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

NinjaScript dash style switch

(login for full post details)
  #1 (permalink)
Canada
 
 
Posts: 29 since Jul 2011
Thanks: 4 given, 1 received

Hi,

I use
 
Code
PlotColors[x][x]=Color.Lambda;
already to switch color from bar to bar.
I use
 
Code
Plots[x].Pen.DashStyle=DashStyle.Dash;
on Initialize{} if I need to change dash style for a plot without switch from bar to bar (conditions)

Is there such a thing just like PlotColors that would command dash style (bar to bar conditions inside OnBarUpdate{}) instead ?

Cheers

Reply With Quote

Can you help answer these questions
from other members on futures io?
Learning By Example [Request]
NinjaTrader
Webinar: Finding your own way in trading w/Adam Grimes
The Elite Circle
What blockvolume is visible? - order processing
NinjaTrader
OFA (Order Flow Analytics) Licence
NinjaTrader
Short Interest Ratio indicator?
ThinkOrSwim
 
 
(login for full post details)
  #2 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received


baberg View Post
Hi,

I use
 
Code
PlotColors[x][x]=Color.Lambda;
already to switch color from bar to bar.
I use
 
Code
Plots[x].Pen.DashStyle=DashStyle.Dash;
on Initialize{} if I need to change dash style for a plot without switch from bar to bar (conditions)

Is there such a thing just like PlotColors that would command dash style (bar to bar conditions inside OnBarUpdate{}) instead ?

Cheers

I think that you need to define two plots, a "Solid" one and a "Dash" one. Instead of changing dash styles you would need to change plots and reset the other one. Not very elegant, but it should work.

Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #3 (permalink)
Portland Oregon, United States
 
Experience: Beginner
Platform: NinjatraderŽ
Broker: CQG, Kinetick
Trading: Gameplay KlownbineŽ Trading of Globex
 
Zondor's Avatar
 
Posts: 1,347 since Jul 2009
Thanks: 1,245 given, 2,721 received


As FT stated, you can have a multi color plot, but not a multi dashstyle plot. Each plot can have only one dashstyle so by switching between plots you can get the effect you want. But switching between plots can cause gaps, and filling them causes the plot to repaint.. the old problem with NT6.5.

Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
The following 2 users say Thank You to Zondor for this post:
 
(login for full post details)
  #4 (permalink)
Canada
 
 
Posts: 29 since Jul 2011
Thanks: 4 given, 1 received

Thanks for the light.

I'll work around the hybrid way then. I'll fill the gaps with "Draw Line" objects if needed.

Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > NinjaScript dash style switch


Last Updated on September 13, 2011


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts