Download MetaTrader 5

Need some help with modification to indicator and creating a labels/objects on the chart

2017.03.20 Indicators Experts

Job finished

Execution time 1 day
Feedback from customer
Excellent programmer! highly recommended
Feedback from employee
Good customer. Interesting task. Good luck.

Specification

I wrote two indicators and need some help with checking out the code and adding some more features. 


Fly price indicator calculates the distance between two spreads (EURGBP - EURUSD) and (EURUSD - GBPUSD) and plots this on a separate window as well as 10, 20 period moving average and 20 period bollinger band (adding and subtracting standard deviation from 20 period moving average). 

Normalised Fly price plots normalised distance ( (distance-average)/standard deviation) and moving average of it. 


I am a very beginner at coding and would like someone to check all the calculations and methods I wrote to make sure they both do as described above and rewrite codes in more efficient way where necessary. 

Then I would like to add the following:

  1. A horitzontal line to the current indicator values which change as the values fluctuate. You will be able to see that I already attempted this.
  2. Display current fly price on the chart window (flyprice[0]) 
  3. Create variables that store current normalised values[0] of specific timeframe (5min, 15min, 1hour and 4hour) and display these on the chart 
  4. Please have a look at the alert and notification function and change it so that it only alerts and notifies once when normalised value[1] of any timeframe(5min, 15min, 1hour and 4hr chart is greater or equal to 2 and less or equal to -2. Alert/notification must say which timeframe is alerting from
  5. Display x period standard deviation of each timeframe (5min, 15min, 1hour and 4hour) on the chart.  x is an extern variable. For example if x = 3, compute (stdev[1] + stdev[2] + stdev[3]) / x for 5min, 15min, 1hour and 4hour and display these 4 average stdev on the chart window.
  6. 3,5 must have 5 decimal point
  7. Create two edit labels on the chart that takes in risk in USD and stop in pips and create a text label "lot to trade" that computes risk in USD/stop in pips
  8. Create an edit label that takes in lot to trade and a buy, sell, close button that executes ordersend(). For example, buy button buys (lot to trade) amount of EURGBP, (lot to trade) amount * 2 of EURUSD and (lot to trade) amount of GBPUSD at market price
  9. Create 4 text labels "Trade Type", "Open price", "Current price" and "Current P/L". Trade type prints Long if EURGBP was bought (i.e Long EURGBP, Short EURUSD, Long GBPUSD) and viceversa. Open price calculates at which price the spread is bought/sold (EURGBP - EURUSD) and (EURUSD - GBPUSD). Current price returns number 2, flyprice[0] and Current P/L computes Open price - Current price if trade type is Long or Current price - Open price if trade type is Short.


I want the labels on the chart to appear as the following:




Responded

1
Developer 1
2017.03.20
Rating
4.98
(84)
Projects
143
40%
Arbitration
17
12% / 76%
Overdue
97
68%
Free
2
Developer 2
2017.03.20
Rating
4.96
(105)
Projects
144
26%
Arbitration
33
6% / 61%
Overdue
58
40%
Working
3
Developer 3
2017.03.21
Rating
5
(76)
Projects
97
54%
Arbitration
6
50% / 50%
Overdue
19
20%
Working

Project information

Budget
20 - 40 USD
Deadlines
from 1 to 5 day(s)