NexusFi: Find Your Edge


Home Menu

 





NinjaScript dash style switch


Discussion in NinjaTrader

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




 
Search this Thread
  #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?
Has anyone taken trading from Agnieska Wood - Ahead Coach?
Psychology and Money Management
tick data interval discrepancy
NinjaTrader
MC Advanced Simulated Trading.
MultiCharts
Topstep experience and review
Trading Reviews and Vendors
Brendt Skorupinsky
Trading Reviews and Vendors
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
ApexTraderFunding.com experience and review
144 thanks
1 Minute Man
64 thanks
HumbleTraders next chapter
40 thanks
Winning attitudes create winning traders
32 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
25 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,104


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,334 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,733


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