NinjaScript dash style switch - futures io
futures io



NinjaScript dash style switch


Discussion in NinjaTrader

Updated
    1. trending_up 2,684 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)
baberg
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?
Questioning Conventional Wisdom
Treasury Notes and Bonds
1 min chart v-shape scan help please
ThinkOrSwim
Color templates for MT5 40 items
Platforms and Indicators
Experience with AGN (Introducing Broker)
Brokers
Eurex Denali vs dxFeed
Sierra Chart
 
 
(login for full post details)
  #2 (permalink)
 Fat Tails 
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,858 since Mar 2010
Thanks: 4,238 given, 26,770 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)
 Zondor 
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,724 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)
baberg
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

Your Charts Should Speak To You w/Bob Cometta

Elite only
 

Our 12-year anniversary w/ $$,$$$ prizes (check soon)

August
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), 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