Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Price String Formatting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Price String Formatting

    Hello,

    I am trying to output a price ( generated by some calculation ) on chart with proper Tick formatting, but i am not getting what i expect. Let "calculated_price" need to be output which is in 0.01 format by calculation. I coded this in two place, 1) After getting calculated_price and 2) In OnRender.

    1) display_price_inTick = baseBars.Instrument.MasterInstrument.RoundDownToTi ckSize(calculated_price);

    and

    2) string priceStr = display_price_inTick.ToString(Core.Globals.GetTick FormatString(AttachedTo.Instrument.MasterInstrumen t.TickSize));

    Now from above what i expect, if calculated_price lands in zone A it should show display_price_inTick = 2172 and if in zone B then 2171.75. same as any Plot value price marker format. But what i am getting is , as soon as calculated_price falls by 0.01 below upper orange line of zone C then it start displaying 2171.75 and continued till lower orange line of zone C. Below lower orange line and being in zone B , it display 2171.50.

    What i need my price string to show same culture as any plot value price marker show.
    Attached Files
    Last edited by devdas; 10-15-2016, 03:43 PM.
    Devdas
    NinjaTrader Ecosystem Vendor - Devdas

    #2
    Hello,

    Its solved, i just saw it was "Down" the culprit

    display_price_inTick = baseBars.Instrument.MasterInstrument.RoundDownToTi ckSize(calculated_price);
    Devdas
    NinjaTrader Ecosystem Vendor - Devdas

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    657 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    373 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    109 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    574 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    579 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X