Convert X axis and Y axis to a point and drawing a line

 

Hi guys, i have a formula. i know (X) is the time and  (Y) is the Price. i calculate (Y) In terms of (X). But how can i put them into a buffer to draw a line? could anyone help me?Thank you in Advanced.

The formula is: 

Y = 3.2467577 -0.73769819*cos(0.25848433*X) +0.57212481*sin(0.25848433*X)

 
  1. momet: i know (X) is the time and  (Y) is the Price. 
    Place Y in buffer[iBarShift(X)]

  2. Remember that MT uses radians. If necessary adjust for degrees.
    double     Sine(double a){    return MathSin(a * M_PI/180.0);     }
    double   Cosine(double a){    return MathCos(a * M_PI/180.0);     }
    

 
William Roeder:
  1. Place Y in buffer[iBarShift(X)]

  2. Remember that MT uses radians. If necessary adjust for degrees.

Thank you William to answered my question but i'm something more than a noob. this formula doesn't need something like (a) , period or something else.i want to draw a simple line with this formula. please help me.

 
  1. Help you with what? You haven't stated a problem, you stated a want.
  2. You stated that X is time. Compute price (Y) and put it in your buffer. What's the problem?
 
William Roeder:
  1. Help you with what? You haven't stated a problem, you stated a want.
  2. You stated that X is time. Compute price (Y) and put it in your buffer. What's the problem?

The problem is this. honestly i dont understand. please write me the code if it does't bother you.

Calculate (Y) In terms of (X) and draw a line with that.i just need this part of code. this formula doesn't have period or anything else . i really appreciate you.