Login Page - Create Account

Support Board


Date/Time: Thu, 02 May 2024 01:14:20 +0000



ZN,ZB,ZF, a problem to have the right price.

View Count: 633

[2018-12-02 14:58:39]
User210074 - Posts: 63
Hello, I try to find the right price for the ZB


/*...*/
if(TS[i].Type==SC_TS_BID||TS[i].Type==SC_TS_ASK){
int PT=(int)TS[i].Price; /* Price -> 13956250 */

string Test = to_string(PT)+" : "+to_string(DD)+" : "+to_string(FC)+" : "+to_string(IM)+" : "+to_string((float)PT*DD)+" = "+to_string(sc.Close[sc.Index]);
sc.AddMessageToLog(Test.c_str(),1);
}
I posted an image of the result

How do you get the same price value as the right price ?
Private File
[2018-12-02 21:09:27]
Sierra Chart Engineering - Posts: 104368
The first step is to get a precise double precision floating point value for these bond prices. And in the next release we are going to add this function to do what you require:
   double sc.CreateDoublePrecisionPrice(const float PriceValue)
  {
    return Round(PriceValue / TickSize)*TickSize;
  }

We will have a new release out later today.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2018-12-02 21:10:51
[2018-12-02 22:25:57]
User210074 - Posts: 63
Thanks,
The code works with all other indices except for ZN, ZF, ZB.
I will wait for the update.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account