price marker for Draw object - futures io
futures io



price marker for Draw object


Discussion in NinjaTrader

Updated
    1. trending_up 3,716 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 7 posts
    2. attach_file 1 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
 

price marker for Draw object

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

Hello,

I have one DrawHorizontalLine in my script. Is it possible to get a price marker on y axis for it ? (without adding a plot/DataSeries on top of it)

Maybe with a parameter inside Initialise{} or something ?

Thanks again.

Reply With Quote

Journal Challenge April 2021 results (now extended!):
Competing for $1800 in prizes from Jigsaw
looks_oneMaking a Living with the Microsby sstheo
(240 thanks from 25 posts)
looks_twoSalao's Journalby Salao
(60 thanks from 12 posts)
looks_3Deetee’s DAX Trading Journal (time based)by Deetee
(48 thanks from 18 posts)
looks_4Learning to Profit - A journey in algorithms and optionsby Syntax
(37 thanks from 15 posts)
looks_5Maybe a little bit different journalby Malykubo
(17 thanks from 16 posts)
 
Best Threads (Most Thanked)
in the last 7 days on futures io
The Crude Dude Oil Trading System
83 thanks
Big Mike in Ecuador
76 thanks
Help improve the FIO community
41 thanks
The New Micro Contract - MICRO BITCOIN coming May 2021
29 thanks
Webinar: Seven Trading Mistakes Solved With Smart Tradin …
26 thanks
 
(login for full post details)
  #3 (permalink)
 Fat Tails 
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,743 received



baberg View Post
Hello,

I have one DrawHorizontalLine in my script. Is it possible to get a price marker on y axis for it ? (without adding a plot/DataSeries on top of it)

Maybe with a parameter inside Initialise{} or something ?

Thanks again.

I am not aware that this is possible. But why don't you want to add a plot?

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

My aim was to get a price marker for a value calculated only on last bar.

I tried first :

if(Bars.LastBarOfSession) PlotColors[0][0]=Color.Yellow
else PlotColors[0][0]=Color.Empty

but I still got a fragment of line displayed from candle [1] to [0]


Now for the easier and valid way : if(Bars.LastBarOfSession) DataSeries ...does de job (no line at all)


Thanks again. I'll rename you officially "my coding guard"

Reply With Quote
 
(login for full post details)
  #5 (permalink)
 Fat Tails 
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,743 received


baberg View Post
My aim was to get a price marker for a value calculated only on last bar.

I tried first :

if(Bars.LastBarOfSession) PlotColors[0][0]=Color.Yellow
else PlotColors[0][0]=Color.Empty

but I still got a fragment of line displayed from candle [1] to [0]

Now for the easier and valid way : if(Bars.LastBarOfSession) DataSeries ...does de job (no line at all)

Thanks again. I'll rename you officially "my coding guard"

Sorry, I do not understand, where you want to draw a line. Also why do you want to use Bars.LastBarOfSession?

Maybe you can attach a chart and manually draw a line where you want to plot it.

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

I wrote :
DrawHorizontalLine("tag",true,Close[0]+ATR(Close,14)[0],Color.Yellow,DashStyle.DashDot,1);
in order to get a line at LAST price level + ATR

but I needed a price marker so in the end I added a dataseries to plot yellow on top of it :
if(Bars.LastBarOfSession) marker.Set(Close[0]+ATR(Close,14)[0]);

if I didn't place if(Bars.LastBarOfSession) in front to get the marker, I'd have a zigzag line of the price+ATR for every candle on top of my horizontal line (therefore 2 lines and one I don't want at all)

Did I code it a distorded way ?! I'm a crazy aloof mind.

Reply With Quote
 
(login for full post details)
  #7 (permalink)
 Fat Tails 
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,743 received

Maybe something like this?

Attached Files
Register to download File Type: zip HorizontaLine.zip (3.5 KB, 115 views)
Reply With Quote
 
(login for full post details)
  #8 (permalink)
baberg
Canada
 
 
Posts: 29 since Jul 2011
Thanks: 4 given, 1 received

I knew it was there on purpose but which purpose. Thanks a lot.

Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > price marker for Draw object


Last Updated on August 21, 2011


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Journal Challenge w/$1,800 in prizes!

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