NexusFi: Find Your Edge


Home Menu

 





GetYByValue returns distinct pixels between prices


Discussion in NinjaTrader

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




 
Search this Thread

GetYByValue returns distinct pixels between prices

  #1 (permalink)
ninejavi
madrid espaņa
 
Posts: 2 since Dec 2013
Thanks Given: 0
Thanks Received: 0

Hello,

I'm doing an indicator in NinjaTrader 8 that use the function GetYByValue and I don't understand the values than it returns because sometimes increments 1 pixel. With an example better:
I have TickSize of 0.25
If I call this function for some prices, the results (for example) are:
GetYByValue(1700.00) returns 100
GetYByValue(1700.25) returns 120
I say ok, the distance between ticksize's is 20 pixels, but ...
GetYByValue(1700.50) returns 140
GetYByValue(1700.75) returns 160
GetYByValue(1701.00) returns 180
GetYByValue(1701.25) returns 201 ---> Why the distance now is 21???
GetYByValue(1701.50) returns 221 -> Now is 20 pixel of distance again

The problem is the indicator, the properties of Chart, ...?

Thanks

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
Cheap historycal L1 data for stocks
Stocks and ETFs
How to apply profiles
Traders Hideout
Trade idea based off three indicators.
Traders Hideout
Better Renko Gaps
The Elite Circle
 
  #3 (permalink)
ninejavi
madrid espaņa
 
Posts: 2 since Dec 2013
Thanks Given: 0
Thanks Received: 0


Hello again

The problem is because this function retuns pixels than are numbers without decimals?

I explain what is my problem. I use this function for calculate each price what is its y-position and then drawing a rectangle with the Volume Total on each level price. How each bar sometimes begins 1pixel more than previous, you can see a separation between some bars. I don't like how visually is it.

How can i do this? Maybe with the function GetYByValueWpf?

Thanks.

Reply With Quote




Last Updated on January 12, 2018


© 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