Download MetaTrader 5
Customer 2017.03.20 15:15 20 - 40 USD   from 1 to 5 day(s)

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:

Job completed in 1 day. The portfolio of Maksym Mudrakov contains 48 finished jobs. This developer received 38 feedbacks with an average rate of 4.97.
Do you want to place a new order for Maksym Mudrakov?
: Excellent programmer! highly recommended
: Good customer. Interesting task. Good luck.
Mladen Rakic

Mladen Rakic 2017.03.21 00:31
Published 203 codes in Library
Jobs: 1 (100% personal)
Overdue: 0 (0%)
Denis Trubachev

Denis Trubachev 2017.03.20 15:20
Published 3 codes in Library
Jobs: 123 (35% personal)
Arbitration: 12 (completed in favor of the developer 8%, canceled in favor of the customer 75%)
Overdue: 82 (66%)
Maksym Mudrakov

Maksym Mudrakov 2017.03.20 16:18
Jobs: 48 (16% personal)
Arbitration: 4 (completed in favor of the developer 0%, canceled in favor of the customer 50%)
Overdue: 26 (54%)
To add comments, please log in or register