Đã Hủy

Metatrader Error help fix it

I wrote a simple program, where I am finding the difference between a moving average's current value, and the closing value of the previous bar. Like this:

19:55:46 [url removed, login to view] 06:40 SMA CHFJPY,M5: *************************************

19:55:46 [url removed, login to view] 06:40 SMA CHFJPY,M5: New Tick On CHFJPY: ServerTime = [url removed, login to view] 06:40:40. LocalTime = [url removed, login to view] 06:40:40.

19:55:46 [url removed, login to view] 06:40 SMA CHFJPY,M5: ************************

19:55:46 [url removed, login to view] 06:40 SMA CHFJPY,M5: Timeframe = 5, L Ema 2, Prev [url removed, login to view] - Current [url removed, login to view], Diff = [url removed, login to view]

19:55:46 [url removed, login to view] 06:40 SMA CHFJPY,M5: Timeframe = 5, L Ema 5, Prev [url removed, login to view] - Current [url removed, login to view], Diff = [url removed, login to view]

19:55:46 [url removed, login to view] 06:40 SMA CHFJPY,M5: Timeframe = 5, L Ema 10, Prev [url removed, login to view] - Current [url removed, login to view], Diff = [url removed, login to view]

19:55:46 [url removed, login to view] 06:40 SMA CHFJPY,M5: Timeframe = 5, L Ema 20, Prev [url removed, login to view] - Current [url removed, login to view], Diff = [url removed, login to view]

19:55:46 [url removed, login to view] 06:40 SMA CHFJPY,M5: Timeframe = 5, L Ema 30, Prev [url removed, login to view] - Current [url removed, login to view], Diff = [url removed, login to view]

19:55:46 [url removed, login to view] 06:40 SMA CHFJPY,M5: Timeframe = 5, L Ema 40, Prev [url removed, login to view] - Current [url removed, login to view], Diff = [url removed, login to view]

19:55:46 [url removed, login to view] 06:40 SMA CHFJPY,M5: Timeframe = 5, L Ema 50, Prev [url removed, login to view] - Current [url removed, login to view], Diff = [url removed, login to view]

19:55:46 [url removed, login to view] 06:40 SMA CHFJPY,M5: Timeframe = 5, S Ema 100, Prev [url removed, login to view] - Current = [url removed, login to view], Diff = [url removed, login to view]

19:55:46 [url removed, login to view] 06:40 SMA CHFJPY,M5:

Now what want to do, and what I am having problems with, is I want to divide one of the "Diff" values into another. I want to find for example what is the percentage change of MA 5 vs MA 2, by dividing MA5's "Diff", by MA's 2, or .022/.028 to = .78.

Well I can't do that apparently. If I try, it always gives me the "zero divide" error. Like this:

19:45:24 [url removed, login to view] 00:03 Percent CHFJPY,M5: *************************************

19:45:24 [url removed, login to view] 00:03 Percent CHFJPY,M5: New Tick On CHFJPY: ServerTime = [url removed, login to view] 00:03:02. LocalTime = [url removed, login to view] 00:03:02.

19:45:24 [url removed, login to view] 00:03 Percent CHFJPY,M5: ***********************************

19:45:24 [url removed, login to view] 00:03 Percent CHFJPY,M5: Timeframe = 5, L Ema 10 / 5 = [url removed, login to view]

19:45:24 [url removed, login to view] 00:03 Percent CHFJPY,M5: Timeframe = 5, L Ema 20 / 5 = [url removed, login to view]

19:45:24 [url removed, login to view] 00:03 Percent CHFJPY,M5: Timeframe = 5, L Ema 30 / 5 = [url removed, login to view]

19:45:24 [url removed, login to view] 00:03 Percent CHFJPY,M5:

19:45:24 [url removed, login to view] 00:03 Percent CHFJPY,M5: *************************************

19:45:24 [url removed, login to view] 00:03 Percent CHFJPY,M5: New Tick On CHFJPY: ServerTime = [url removed, login to view] 00:03:02. LocalTime = [url removed, login to view] 00:03:02.

19:45:24 [url removed, login to view] 00:03 Percent CHFJPY,M5: ***********************************

19:45:24 [url removed, login to view] 00:03 Percent CHFJPY,M5: zero divide

19:45:24 [url removed, login to view] 00:03 Percent CHFJPY,M5:

19:45:24 [url removed, login to view] 00:03 Percent CHFJPY,M5:

19:45:24 [url removed, login to view] 00:03 Percent CHFJPY,M5:

19:45:24 [url removed, login to view] 00:03 Percent CHFJPY,M5:

19:45:24 [url removed, login to view] 00:03 Percent CHFJPY,M5:

19:45:24 [url removed, login to view] 00:03 Percent CHFJPY,M5:

19:45:24 [url removed, login to view] 00:03 Percent CHFJPY,M5:

Then you get nothing after that.

I mean, what is this thing's problem? What does it want from me? What the heck?! Your job, is to find out what I am doing wrong, and make it work. Attached are the two eas. I stripped them down to just these two equations.

Kỹ năng: Metatrader

Xem thêm: help finding job, it work, ema, eas, fix zero divide error, fix bar, find fix program, zero divide error, simple ema, metatrader program, zero divide, metatrader current bar, metatrader bar, job 002, 100 ema, job 003, moving average ma5, fix metatrader, help find job, fix help center live, metatrader percentage, 003, metatrader fix, bar moving average, current value metatrader

Về Bên Thuê:
( 39 nhận xét ) Escondido, United States

Mã Dự Án: #4556041

4 freelancer đang chào giá trung bình $34 cho công việc này

programmerlancer

I am willing to help and teach how to avoid similar bugs in the future.

$30 USD trong 1 ngày
(6 Đánh Giá)
4.6
sangmane

let's do it

$35 USD trong 1 ngày
(5 Đánh Giá)
3.3
MTProgrammer

Hello, i know how to slove it

$35 USD trong 3 ngày
(3 Đánh Giá)
3.2
avoitenko

i can perform this job

$35 USD trong 1 ngày
(3 Đánh Giá)
2.5