NinjaScript dash style switch - futures io
futures io futures trading



NinjaScript dash style switch


Discussion in NinjaTrader

Updated by baberg
    1. trending_up 2,462 views
    2. thumb_up 4 thanks given
    3. group 3 followers
    1. forum 3 replies
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,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)

 
Thread Tools Search this Thread
 

NinjaScript dash style switch

  #1 (permalink)
Canada
 
 
Posts: 29 since Jul 2011
Thanks: 4 given, 1 received

NinjaScript dash style switch

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?
Convert NinjaTrader NT7 indicator to Tradestation EasyLanguage and RADARSCREEN
Platforms and Indicators
Issue meeting order entry conditions
Elite Automated NinjaTrader Trading
Last 5 minutes Label
ThinkOrSwim
Moving average with Lag reduction
NinjaTrader
Linux?
ThinkOrSwim
 
Best Threads (Most Thanked)
in the last 7 days on futures io
FIO Journal Challenge - June 2020 edition w/SharkIndicators
57 thanks
Spoo-nalysis ES e-mini futures S&P 500
55 thanks
June Charity Fundraiser - Feeding hungry families
51 thanks
Fixed vs trailing stops
28 thanks
AMP Futures / AMP Global Review
27 thanks
 
  #2 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,824 since Mar 2010
Thanks: 4,237 given, 26,524 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:
 
  #3 (permalink)
Portland Oregon, United States
 
Experience: Beginner
Platform: NinjatraderŽ
Broker: CQG, Kinetick
Trading: Gameplay KlownbineŽ Trading of Globex
 
Zondor's Avatar
 
Posts: 1,346 since Jul 2009
Thanks: 1,245 given, 2,713 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:
 
  #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




Upcoming Webinars and Events
 

Free BloodHound Licenses for everyone!

June
 

Every journal equals ten meals for the hungry

June
     



Copyright © 2020 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