Vant Tharp's Percent Volatility Position Sizing - FX equation


we are creating the script where we would like to use Percent Volatility Position Sizing Method described in Van Tharp’s book Trade Your Way to Financial Freedom. I was wondering if anyone could help us out.

Volatility refers to the amount of daily price movement of the
underlying instrument over an arbitrary period of time. It’s a direct
measurement of the price change that you are likely to be exposed
to-for or against you-in any given position. If you equate the
volatility of each position that you take, by making it a fixed percentage
of your equity, then you are basically equalizing the possible
market fluctuations of each portfolio element to which you are
exposing yourself in the immediate future.
[B]Volatility, in most cases, simply is the difference between the
high and the low of the day. If IBM varies between 141 and 143%
then its volatility is 2.5 points, However, using an average true
range takes into account any gap openings. Thus, if IBM closed at
139 yesterday, but varied between 141 and 143% today, you’d need
to add in the 2 points in the gap opening to determine the true
range. Thus, today’s true ranges is between 139 and 143’&or 4%
points. This is basically Wells Wilder’s average true range calculation
as shown in the definitions~at the end of the book.
Here’s how a percent volatility calculation might~work for
position sizing. Suppose that you have $50,000 in your account and
you want to buy gold. Let’s say that gold is at $400 per ounce and
during the last 10 days the daily range is $3. We will use a IO-day
simple moving average of the average true range as our measure of
volatility. How many gold contracts can we buy?
Since the daily range is $3 and a point is worth $100 (i.e., the
contract is for 100 ounces), that gives the daily volatility a value of
$300 per gold contract. Let’s say that we are going to allow volatility
to be a maximum of 2 percent of our equity. Two percent of
$50,000 is $1,000. If we divide our $300 per contract fluctuation into
our allowable limit of $1,000, we get 3.3 contracts. Thus, our position-
sizing model, based on volatility, would allow us to purchase
3 contracts[/B].”

We are trading forex and this formula applies to the futures markets. I’ve been trading for several years, it’s actually first time I’ve came accross this method. Could someone help us clarify the correct formula for the forex market based on the text above?

The problem is that there are many softwares, sites interpreting the above differently. It’s based on the above text altought there are many versions I’ve found and I’m just not sure which one would be the most accurate based on the text above.

Wealth Lab - Percent Volatility - Wealth-Lab Wiki
TradeStation - Strategy Impact: Trade-Size Formulas | Analysis Concepts | TradeStation Labs
AdapTrade -

So we have several formulas…

Percent Volatility Position Size = (y % of Equity x 0.01) x Account Equity / (point value * ATR Points)
Share Amount = (TS*EQ)/TR; Position Size = Equity X Risk% / ATR

Which one would be the best for the forex market? Or how would above text be rewritten f.e. instead of using IBM and Gold… to EURUSD? What would be the formula for the forex market?

I’m looking for the clearest formula that would best represent above text and fit to the forex market.

I’m truly ashamed by myself, I’m just unable to convert original Van Tharp’s text to FX formula extracting it just from the text above. Can someone help me with this?