fort2w wrote:rickyineng wrote:Hi TRO,
I have observed a little glitch with TRO_BuyZone, if the currency uses 5 digits after the decimal point (to support fractional pip pricing, FXCM does!). In this case, predefined variable "Point" is stored as 0.00001. Due to this Buyzone calculations are misleading.
After adding the following piece of code (never mind, a bit dirty, just for workaround!) at around line no 116, it looks allright with both 0.0001 and 0.00001 as Point values.
-------------------
double abspointvalue = Point;
if (abspointvalue == 0.00001 || abspointvalue == 0.001)
{
abspointvalue = abspointvalue * 10;
}
-----------------
Replace "Point" with "abspointvalue" from line 118 to the end of the function.
And in lines 261 and 267, pass the second argument to "DoubleToStr" function as 1 instead of 0 to see all the profit!
It would be great if you can throw a word to approve it
cheerz,
-- ricky
Having the same problem - I was able to address target & stop in the input window. Must the Buy/Sell prices be adressed in the programming level or in the inputs window?
I don't have ricky's programming skill...
please help.
thanks
Hi fort2w,
Its quite straight forward.... You may give it a try! Open MT4. Delete the Buyzone indicator from the charts. On the panel, there is a button named "MetaEditor" (Next to New Order). Click on that button, Meta Editor gets opened. Now in the meta editor, from the the right hand side panel, expand "indicators" folder. You see all the indicators. From the list, select "TRO_BuyZone.mq4". It opens the code in the editor. Modify it as per my last post (pasted below with a modification to include JPY pairs). Save it. Click the "Compile" button. Thats it!
cheerz,
-- ricky
-------------
After adding the following piece of code (never mind, a bit dirty, just for workaround!) at around line no 116, it looks allright with both 0.0001 and 0.00001 as Point values.
#####################
double abspointvalue = Point;
if (abspointvalue == 0.00001 || abspointvalue == 0.001)
{
abspointvalue = abspointvalue * 10;
}
-----------------
Replace "Point" with "abspointvalue" from line 118 to the end of the function (line no 281 is the end of function).
And in lines 261 and 267, pass the second argument to "DoubleToStr" function as 1 instead of 0 to see all the profit!
----------------------
#################