I am writing a Signal in Easylanguage for MultiCharts - to use on JPY and USD pairs. When referencing Open and Close in my easylanguage code, it is only returning prices to two decimal points. e.g. 1.54 for GBP/USD whereas the price is 1.53819. Or for EUR/JPY 135.71 when the price is 135.714.
I obviously want to use the Open and Close reserved words when placing orders - if this is only specified to two decimal points, it could be disastrous.
the signal will use whatever number of decimals are available. You only see two in the output because by default it's limited to two decimal. For the output you can easily add more decimal spaces. For your other computations this is not needed.
A numerical expression can be formatted to specify the minimum number of characters, including the decimal point, and the number of decimal places, to be used for the output:
Where: C - minimum number of characters
E - number of decimal places
This would display the text with three decimal places
The following user says Thank You to ABCTG for this post:
Thanks for the reply - I was concerned the Open and Close prices displayed in the Alert would be what was sent to the broker when orders were submitted. As you've stated, this is not the case, and it's simply a matter of display/formatting for the Alert text.
Thanks for your help and confirmation on how to get the decimal places displayed in the Alert.
The following user says Thank You to thephantom for this post: