Average Cost Line Indicator

指标 脚本

工作已完成

执行时间7 天
客户反馈
MQL4_ORG was fantastic and easy to work with. Very patient and understanding with me as a buyer. This was my first purchase and I didnt always know what the next step on my end was to keep the project flowing. I will use MQL4_ORG again and you should too. 5 STARS FOR SURE.
员工反馈
thanks

指定

Hello, 

 

This is my first job post here so forgive me if I am not exactly sure of all the protocal. 

I need a average cost indicator for my charts.

The program needs to calculate the average cost of my positions and then place a line on the chart to indicate this.

Simple example (the program would need to obviously go out 5 decimal points as well as figure out position sizes that include micro,mini and full lots.)

This is full lots just for example.

Trade 1 Sell 1 EUR/USD @ 1.24000

Trade 2 Sell 1 EUR/USD @ 1.23000

Trade 3 Sell 1 EUR?USD @ 1.23500 

Trade 4 Sell 1 EUR/USD @ 1.24500

Total Position Sell 4 EUR  Average cost of position = 1.24500 + 1.24000 + 1.23500 + 1.23000 / 4 = 1.2375

The indicator would now put a line on the chart at 1.2375

Obviously each time a position is added to or subtracted from the calculation would change and the bar would adjust.

 

I have included a script that i found that was supposed to do what I am looking for but it does not seem to be able to add in mucro/mini lots because i just tried to use it and the calculation is wrong. It may however provide someone with a base they can use to speed up the process.

I look forward to hearing from someone that can help get this done for me. 

反馈

1
开发者 1
等级
(500)
项目
966
74%
仲裁
27
19% / 67%
逾期
100
10%
已载入
发布者: 1 文章, 6 代码
2
开发者 2
等级
(41)
项目
124
34%
仲裁
32
13% / 75%
逾期
53
43%
空闲
3
开发者 3
等级
(195)
项目
395
28%
仲裁
155
20% / 52%
逾期
112
28%
空闲
4
开发者 4
等级
(24)
项目
36
39%
仲裁
1
0% / 0%
逾期
17
47%
空闲
5
开发者 5
等级
(72)
项目
254
53%
仲裁
17
47% / 41%
逾期
83
33%
工作中
6
开发者 6
等级
项目
0
0%
仲裁
0
逾期
0
空闲
7
开发者 7
等级
(273)
项目
396
63%
仲裁
70
53% / 26%
逾期
198
50%
空闲

项目信息

预算