In the past I have been extremely grateful for that post that has thrown light on a trading or coding problem I have been turning over. I have come to the conclusion that most traders/investors on these forums are skint hobby traders with questionable knowledge. To that hopeful, this post is for you - hopefully you will make something of your hobby ! 😂 😂
I was both surprised and not surprised that MT4 is still going.
MetaQuotes released MT5 in 2010 and stop selling MT4 platform licenses to new customers in 2018.
A favor was called in so I had occasion to load up a MT4 demo and tidy up some indicators and EAs.
One or two are trade horses but most are research purposed, not trading purposed - quick instrument changer for comparison of range and margin, tick value and other costs etc.
The indicators I will post next week or later.
No coding request - all past coding have been free at selective discretion and commission requests are not an option.
TSLA and GOOG range, margin and tick value costs comparisons. Screenshots taken immediately one after the after.
Trading Volume: 100
Tick Value: TSLA || GOOG - both 0.01
Margin: TSLA - 5,517 || GOOG - 2,768
Typical 30 Day Range (average): TSLA - 963 points || GOOG - 249 points
Profit/Loss calculation = Trading Volume x Tick Value x Points
As above charts TSLA & GOOG: 100 x 0.01 x 250 = USD 250.00
Note: if the deposit currency is other than USD the 250 must be further translated into account deposit currency at the relevant exchange rate.
Of note: Dax Tick Value is often quoted in Euros against the actual futures contract specifications.
Example calculation:
Trading volume: 0.10
Price difference profit or loss: 15766.5 - 15759.6 = 6.9 = 69 points.
Tick Value in Euros: 2.5 (the Tick Value is given in specification as 2.5 and Tick Size as 0.1 // The actual futures contract is EUR 25 so 25 x 0.1 = EUR 2.5 - get it !) see here for futures contract specifications -
https://www.ampfutures.com/trading-info/contract-specifications
Exchange Rate EUR-USD: 1.07246 (if the deposit currency were EUR then exchange is parity or 1 or EUR-EUR, so exchange conversion would not be needed)
Profit/Loss: 0.10 x 69 x € 2.5 x 1.07246 = to USD 18.499935 = $18.50
Some TSAL - GOOG comparisons:
Over a 1, 5, 15, 30 day range and 1, 4, 13, 26 week range GOOG is noted to be considerably less than TSLA.
Tick Value of both is 0.01.
GOOG margin is about half TSLA.
Typical 30 day range 963 to 249 points.
As per above charts - Range Points Today.
TSLA: 724 || GOOG: 175
If both account were in profit for Range Points Today - hypothetically the illustrious ones are trading gods who call tops and bottoms with insane precision.
Except the god trading GOOg is a bit of a marsupial -
www.youtube.com/watch?v=gNqQL-1gZF8
TSLA: $724 for 724 points and margin cost 5,517 at 100 trading volume.
GOOG: $175 for 175 points and margin cost 2,768 at 100 trading volume
Increasing GOOG Trading Volume increases required margin.
GOOG: 200 trading volume x 0.01 x 175 = $350. Required margin = 5,536. (2 x 2,768)
GOOG: 300 trading volume x 0.01 x 175 = $525. Required margin = 8,304.
GOOG: 400 trading volume x 0,01 x 175 = $700. Required margin = 11,072.
so ... TSLA: 100 trading volume x 0.01 x 724 = $724. Required margin = 5,517.
Of course, SL requirements - beyond the scope of this brief - need to be taken into consideration.
An internet search on management will typically return something like this
Analyzing the above:
Any number multiplied by 50 will represent 2% of the product.
Example: 17 x 50 = 850 and 17/850 x 100 = 2%.
so 1,000 x 50 = 50,000 and 1,000/50,000 x 100 = 2%.
- however, no consideration is given to margin requirements.
- margins reduce trading working equity - margin is not working equity and trading can be closed out at 100% margin
- margins vary in size according to instrument traded - thus accordingly, reducing working equity by varying amounts.
IMO, on leveraged products, margin should never be considered working equity. Margin is dead meat - a collateral reserve that should never be smelt for a margin call. If you are smelling it you are on fire but not in a good way - you are burning alive..
With regards leveraged products and single stock day trading
- no one cares if you blow an account you really cannot afford
- not every day is a day trading day for any particular product and markets can remain untradable for said product for extended periods
- think of risk not in % bs but in numbers. numbers. how many quantifiable failed trades can be risked in any given day - see number of consecutive failed trades examples below
- ruthless 'numerical' limit of 2 - 3 a day will prevent rouge trading in shit conditions - market, psychological or otherwise.
On TSLA a SL of 100 points equates to 100 x 0.01 x 100 = $100.
So a 100 point SL at $100 x 50 = $5,000 and 100/5,000 x 100 = 2%.
So capital required to trade TSLA with a 100 point SL at 2% risk at 100 trading volume = $5,000
plus $5,517
margin = trading account of $10,517.
So in essence, in a world of zero slippage, a trader could sustain 50 consecutive 100 point SLs (the ultimate revenge trader) before hitting 100% margin.
Now for purposes of comparison with regards the generally accepted definition of 2% risk >> 2% of a $10,517 trading account is: 2/100 x 10,517 = $210.34. So what is the % risk.
So margin is 5,517 and working equity is 5,000. Therefore actual percentage risk is 'actually' 210.34/5,000 x 100 = 4.2 %.
And the ultimate revenge trader could only sustain 23.77 (5,000/210.34) consecutive 100 point SLs before hitting 100% margin.
For purposes of comparison - if you were considering a vehicle safety rating - on a like for like basis - with your family welfare in mind - would you go for the 50 (2%) or the 23.77 (4.2%) ?
Calculating Risk at 1%.
Any number multiplied x 100 will represent 1% of the product.
Example: 17 x 100 = 1,700 and 17/1,700 x 100 = 1%.
So a 100 point SL at £100 x 100 = $10,000 and 100/10,000 x 100 = 1%.
So capital required to trade TSLA with a 100 point SL at 1% risk at 100 trading volume = $10,000
plus $5,517
margin = trading account of $15,517.
So in essence, in a world of zero slippage, a trader could sustain 100 consecutive 100 point SLs before hitting 100% margin.
Margin Calculation
Margin percentage is given as 20.0%. This can also be given as 1:5 or 5:1 (100/20 = 5 hence 5:1)
Note: MT4 brokers are notorious for not listing correct contract specifications - with some any f value will do - especially tick value*.
The Ask price and Margin in the TSLA chart are respectively
275.85 and
USD 5,517.00.
MARGIN = trading volume x margin percentage x price (in this case Ask)
= 100 x 20/100 x 275.84 = $5,516.8 = USD 5,517.00 or
= 100 x 1/5 x 275.84 = $5,516.8 = USD 5,517.00
or in the case of 100 trading volume
= 100/5 x price
= 20 x price = 20 x 275.85 = USD 5,517.00
-------------------------------------------------------------------------
* The broker is at liberty to assign any tick size / tick value / tick parameter to any instrument. Thus, different brokers can each assign different tick parameters to the same instrument. MQL4/5 code can only read the tick parameters as per broker specifications. Often the specified values are not as per broker actual calculation assignment. Either the broker is too lazy, too fuck it - its retail or too ignorant to specify the correct tick parameter. Thus, the code - while correct and without fault - will read incorrect values into calculations and produce likewise results. A typical problem - when the tick value currency is not the same as the account deposit currency (Dax and other product specifications derived from actual futures specifications) and the broker is too 'fuck it' to dynamically translate into deposit currency (as in the case of currencies - their main bead and butter) is well documented on coding forums.