거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Facebook에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
Experts

OnTester Commission Calculator - MetaTrader 5용 expert

조회수:
3696
평가:
(29)
게시됨:
2021.06.30 05:21
업데이트됨:
2021.06.30 14:08
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

Update : Now it also calculates the commission on "end of test" result on Tester


I was testing my Expert Advisor while i found that i have to calculate commission charged by my broker as well otherwise the profit shown by strategy could not be true, So i tried to use in built commission feature on Metatrader5 but this did not work!

https://www.mql5.com/en/forum/372056

So i decided to code this feature externally.

This code can be used in your own expert advisor to calculate the commission (you may need to know programming)

This EA works for testing Market Order, Limit Order, Stop Limit Order and Stop Market Order and same can be selected from SelectMode Input

Fee in percentage can be added. Like my broker charges 0.04% commission so i added there

After adding Entry, SL and TP you can run this EA on strategy tester

On testing you can see i have total 4 deals executed

For each deal, the commission should be calculated that is set on input : 0.04%

Lets test in on excel


As you can see for 0.1 qty its 1.2546 for Limit Buy Order and 1.284 for Take Profit Order

so summing up 1.2546 + 1.284 = 2.5386

and total trades are 2

so 2.5386 *2 = 5.0772

so at the end of Strategy Tester Report in Journal Tab, the Total Commission is Printed


I hope this calculation method will help you testing your EA with more accurate profit when it excludes commissions which your broker charges


Momentum-based Adaptive Channel Momentum-based Adaptive Channel

The Momentum-based Adaptive Channel is a version of the adaptive channel based on the Euclidean distance. It is designed to adapt according to the dynamic market as needed.

String Manipulation Functions String Manipulation Functions

A collection of useful string manipulation functions.

The Enhanced Signal To Noise Ratio The Enhanced Signal To Noise Ratio

"The Enhanced Signal To Noise Ratio" was created by John Ehlers and published in the book "Rocket Science for Traders", pg.87-88.

time bomb time bomb

pips in time