ATR value to Pips - Tutorial
-
Recently I was looking for a good solution to get always the ATR value in Pips without currency problem.
So here is a useful tutorial for you:
-
The first step is to create a new double Variable where we are going to store the result of our calculation.
In my case, I used "ATRvalue"

-
Let's create the formula using 2 different formula blocks
The formula to convert ATR value in Pips is really simple:
ATRpips = ATR * 10000 ----> For any currency
ATRpips = ATR * 100 ----> For JPY
Just copy the image and use the double Variable to store our results.

- Now we need a block that helps the EA to chose which one formula to use, so the only thing I need to know is if we are trading a JPY pair.
Since JPY is always the quote currency we need just one block:

The final results will be like this:
On Tick

Upvote if you found helpful this tutorial and have a nice day.
-
-
Upvoted and congratulated!
Great tutorial. -
If you need to multiply with a coeficient afterwards you do not need to put another block and yet another variable, for faster result do it like this :

-
@jerkha
What about working out ATR as a pip value for indices and other non forex instruments? Any ideas as the pip values can be difficult to calculate as different brokers present the data in different ways. I have found setting the FXDreema options doesn't always work consistently due to broker differences.Any help would be much appreciated.
Thanks Drew
-
@drewinbrissie
I do not know about non-forex instrument since I work solely on forex but maybe there is a way to test for how many decimal the value has and *10 it until it has no decimal left ? -
does this work at xauusd (gold) it has same jPY phenomenal .. and what about BTCUSD ?
-
upvoted .. so helpful .. thanks
-
All fxDReema EAs can be used in any non forex instrument as far as you adjust the pip rules in the 'global options' section.
-
@fenixtrading Does this apply to metals and stock indices?
-
@6ixpappi Use this in MT4 or MT5, it works on all assets. https://fxdreema.com/shared/bUCD0mdBb
-
@jstap which of the below is the ATR value in pips?

-
Gotten
-
Use this one, I added the word else to the code: https://fxdreema.com/shared/bUCD0mdBb
-
@jstap ooh...But I dont see the difference, can you show me pls?
-
else is written in the code:

-
@jstap ooh... thanks
]but check the link, its isn't the right one...the link you sent doesn't contain the else..
Also, should this be used in MT5 also? The else
-
The picture was from that link, otherwise just write the word else in the code.
-
Hello everyone,
I was just dealing with this pips calculation and I found a very safe way to do that for any symbol. It turns out that it is also the easiest way.
Because this pip calculation involves many possible scenarios, including broker settings, asset class, etc... FX Dreema has already done all this work in advance for us, by creating a function that converts 1 pip to a price fraction, We can just save that to a variable and use it on any calculation to convert pips to price fraction and vice versa, and by using FX Dreema's methods, the compatibility with other FX Dreema's functions will be safer where it uses pips or price fractions.Here is a screenshot:

Safe Bots to everyone!
-
@QuantEngineer
A more direct approach:
http://fxdreema.com/forum/post/94132