Convert them to string -> strip the first 4 chars -> convert to int
it won't be very fast I'm afraid
or maybe this is better:
(1.2058 - (round(1.2058*100)/100))*1000
and
(1.2042 - (round(1.2058*100)/100))*1000
hth
Russell
--- edit --
fixed typo
Thank you Russell,
I am not infront of my Meta Trader...but just to make sure I understand the formula you provided:
(1.2058 - (round(1.2058*100)/100))*1000 = 58 ?
I tried to find an explination of the "round" command, but I couldnt find something that I understood, so I just wanted to clairify :)
Thank you again.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
If I am using a Moving Average based on Closing Price. Is there a way for it to only compare the last two digits of the Indicator ?
For Example: We have the current Bar, We have the bar previous to that (Close1) and the bar previous to that one (Close2).
If Close1 = 1.2058 and Close2 = 1.2042
Is there a way to make an EA see Close1 = 58 and Close2 = 42 ?
The Main idea, would be so I could write something like.....
IF(Close1 >= 50 && Close2< 50)
....rest of the coding to open orders (I have this part down) :)
Thank you for any help.