NexusFi: Find Your Edge


Home Menu

 





NinjaScript dash style switch


Discussion in NinjaTrader

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




 
Search this Thread

NinjaScript dash style switch

  #1 (permalink)
baberg
Canada
 
Posts: 29 since Jul 2011
Thanks Given: 4
Thanks Received: 1

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 NexusFi?
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Are there any eval firms that allow you to sink to your …
Traders Hideout
Futures True Range Report
The Elite Circle
Exit Strategy
NinjaTrader
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
60 thanks
Funded Trader platforms
43 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #2 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


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
Thanked by:
  #3 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: NinjatraderŽ
Broker: CQG, Kinetick
Trading: Gameplay KlownbineŽ Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731


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 NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
baberg
Canada
 
Posts: 29 since Jul 2011
Thanks Given: 4
Thanks Received: 1

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




Last Updated on September 13, 2011


© 2024 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 - Privacy Policy - Downloads - Top
no new posts