Đã 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 105.850 - Current 105.878, Diff = 0.028

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

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

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

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

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

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

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

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 = 0.046

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

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

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: you fix it, what is the fix, the fix it, help me fix it, help fix it, help finding a job, fix it it, fix it help, fix it for you, fix it for me, fix it fix it fix it fix it, fix it fix it fix it, fix it fix it, find it work, 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

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