Auto Volume according to entry price and take profit price

MQL4 脚本

工作已完成

执行时间2 小时
客户反馈
.
员工反馈
Clear requirements, fast response, was good working with you

指定

I need a script that can automatic calculate the volume needed for a trade to my desire take profit amount


Example:

I want to open pending order of buying EURUSD with the following prices. Take profit amount: $100.

To input:

Type of order to choose : (Buy Stop or Buy Limit or Sell Stop or Sell limit) - to choose from drop-down menu

Profit target: ($100) - to key in manually

Entry price: (1.10000) - to key in manually

Take profit: (1.10050) - to key in manually

Once key in the data, pending order will be open with volume calculated automatically. In this case it will be

" size: 2.0 / Entry Price: 1.10000 / Take profit: 1.10050 "


I am trading the following currency:

USD / JPY / CAD / NZD and others


Please take note that different currency have different price* (or size), the script must be able to calculate accordingly to my TAKE PROFIT AMT. if i want take profit $100, MEANS i want take profit $100. the size must be correct.



*example for a size 2.0, EURUSD is $20 per pip, but EURJPY will be around $17.73 per pip and EURCAD will be around  $16.06 per pip and EURNZD will be around $13.88 etc etc

Script must be able to auto calculate according to market price and NOT LIKE THE FOLLOWING:


Example (ERROR IN CALCULATION)

I want to open pending order of buying EURNZD with the following prices. Take profit amount: $100.

To input:

Type of order to choose : (Buy Stop or Buy Limit or Sell Stop or Sell limit) - to choose from drop-down menu

Profit target: ($100) - to key in manually

Entry price: (1.10000) - to key in manually

Take profit: (1.10050) - to key in manually

If the pending order is as below, IT WILL BE WRONG !!!!!!!!!!!!!!!

" size: 2.0 / Entry Price: 1.10000 / Take profit: 1.10050 "




反馈

1
开发者 1
等级
(34)
项目
60
23%
仲裁
11
73% / 9%
逾期
3
5%
空闲
2
开发者 2
等级
(69)
项目
79
29%
仲裁
8
13% / 63%
逾期
4
5%
空闲
3
开发者 3
等级
(176)
项目
227
19%
仲裁
21
38% / 24%
逾期
0
工作中
4
开发者 4
等级
(67)
项目
97
35%
仲裁
11
27% / 45%
逾期
14
14%
空闲
5
开发者 5
等级
(305)
项目
547
35%
仲裁
78
32% / 42%
逾期
197
36%
工作中
6
开发者 6
等级
(568)
项目
641
41%
仲裁
25
48% / 36%
逾期
46
7%
工作中

项目信息

预算
30+ USD