Hi, i am doing some coding to display recent high low pips calculation on the chart screen .
example, if i am going to go long, i have to set my SL, rather then using my mouse to drag and see the pips,
i am coding it to display on the screen.
So for Long trade, i take the Ask price - Recent low = SL pips , so i know how many pips to set for stop lost.
Problems is :
1) I just able to get it to display on 0.092 pips rather then 92 pips on EJ chart, is better if it can show just 92 pips.
2) when i load the code on GU, it display 0.000 or some time 0.001 only, because of EJ and GU they have different decimal point.
Need some help here.
thanks.
Here is the calculation code :
double High0,High1,High2,Low0,Low1,Low2;
double LongP1,LongP2,LongP3, ShortP1,ShortP2,ShortP3;
High0 = High[0];
High1 = High[1];
High2 = High[2];
Low0 = Low[0];
Low1 = Low[1];
Low2 = Low[2];
LongP1 = Ask - Low0;
LongP2 = Ask - Low1;
LongP3 = Ask - Low2;
ShortP1 = High0 - Bid;
ShortP2 = High1 - Bid;
ShortP3 = High2 - Bid;
string NrLongP1 = DoubleToStr(NormalizeDouble(LongP1,3),3);
string NrLongP2 = DoubleToStr(NormalizeDouble(LongP2,3),3);
string NrLongP3 = DoubleToStr(NormalizeDouble(LongP3,3),3);
string NrShortP1 = DoubleToStr(NormalizeDouble(ShortP1,3),3);
string NrShortP2 = DoubleToStr(NormalizeDouble(ShortP2,3),3);
string NrShortP3 = DoubleToStr(NormalizeDouble(ShortP3,3),3);
example, if i am going to go long, i have to set my SL, rather then using my mouse to drag and see the pips,
i am coding it to display on the screen.
So for Long trade, i take the Ask price - Recent low = SL pips , so i know how many pips to set for stop lost.
Problems is :
1) I just able to get it to display on 0.092 pips rather then 92 pips on EJ chart, is better if it can show just 92 pips.
2) when i load the code on GU, it display 0.000 or some time 0.001 only, because of EJ and GU they have different decimal point.
Need some help here.
thanks.
Here is the calculation code :
double High0,High1,High2,Low0,Low1,Low2;
double LongP1,LongP2,LongP3, ShortP1,ShortP2,ShortP3;
High0 = High[0];
High1 = High[1];
High2 = High[2];
Low0 = Low[0];
Low1 = Low[1];
Low2 = Low[2];
LongP1 = Ask - Low0;
LongP2 = Ask - Low1;
LongP3 = Ask - Low2;
ShortP1 = High0 - Bid;
ShortP2 = High1 - Bid;
ShortP3 = High2 - Bid;
string NrLongP1 = DoubleToStr(NormalizeDouble(LongP1,3),3);
string NrLongP2 = DoubleToStr(NormalizeDouble(LongP2,3),3);
string NrLongP3 = DoubleToStr(NormalizeDouble(LongP3,3),3);
string NrShortP1 = DoubleToStr(NormalizeDouble(ShortP1,3),3);
string NrShortP2 = DoubleToStr(NormalizeDouble(ShortP2,3),3);
string NrShortP3 = DoubleToStr(NormalizeDouble(ShortP3,3),3);