A division by zero error appeared in one indicator - page 3 1234567891011 New comment [Deleted] 2018.07.04 10:56 #21 Aleksey Vyazmikin: In general, profiling on historical data shows no errors.In general, when limit=0 - print to log, in print - all components from which the variable limit is formed. Aleksey Vyazmikin 2018.07.04 11:41 #22 Alexey Kozitsyn: In general, when limit=0 - print to log, in print - all the components from which the variable limit is formed.Something's messing me up today. code if (limit==0) { limit=2; Print("start_time - ",TimeToString(start_time,TIME_DATE|TIME_MINUTES)," stop_time - ",TimeToString(stop_time,TIME_DATE|TIME_MINUTES)); Print("start_index=",start_index, " stop_index=",stop_index); } in the printer. FO 0 12:14:11.719 IndDrafter (BR Splice,M15) start_time - 2018.07.04 10:00 stop_time - 2018.07.05 00:00 KL 0 12:14:12.072 IndDrafter (BR Splice,M15) start_time - 2018.07.04 10:00 stop_time - 2018.07.05 00:00 QQ 0 12:14:12.072 IndDrafter (BR Splice,M15) start_time - 2018.07.04 10:00 stop_time - 2018.07.05 00:00 GF 0 12:14:12.872 IndDrafter (BR Splice,M15) start_time - 2018.07.04 10:00 stop_time - 2018.07.05 00:00 And where is the print withstart_index? Sergey Savinkin 2018.07.04 11:48 #23 Aleksey Vyazmikin: I'm having a bit of a glitch today. code in the printer. Where's the print withstart_index?Either it's in the logs, or the print isn't coming out of this part of the code at all. Aleksey Vyazmikin 2018.07.04 11:49 #24 Sergey Savinkin: Either in the logs, or the prints aren't derived from that part of the code at all.So I opened the log file and there's only one line. Prints from here - I wrote this myself, and if you comment on the first print, it doesn't print any more. Vladimir Karputov 2018.07.04 11:50 #25 Aleksey Vyazmikin: I'm having a bit of a glitch today. code in the printer. Where's the print withstart_index? Aleksey Vyazmikin 2018.07.04 11:53 #26 Vladimir Karputov: What does this have to do with optimization, the log from the terminal ...\MQL5\Logs I erased the log for today - I'm waiting for the new data. Maybe that print really was with the wrong code. Sergey Savinkin 2018.07.04 11:55 #27 Aleksey Vyazmikin: I'm having a bit of a glitch today. code in the printer. Where's the printer with thestart_index?Then that leaves 2 versions: 1. Poltergeist, black magic, machinations of sorcerer enemies. 2. this is the wrong version of indicator. Maybe you are writing in a copy and there is a different indicator on the chart. Questions from a "dummy" OrderProfit() didn't return profit I will write the Vladimir Karputov 2018.07.04 11:55 #28 Aleksey Vyazmikin: What does this have to do with optimization, the log from the terminal ...\MQL5\LogsIf my memory serves me right, the Terminal: Toolbox - Experts tab forcibly smothers the over-zealous ones who VERY often shoot prints to the journal. Aleksey Vyazmikin 2018.07.04 11:56 #29 Sergey Savinkin: This leaves two versions: 1. Poltergeist, black magic, machinations of witchdoctors. 2. this is the wrong version of the indicator. Maybe you are writing in a copy, and there is another indicator on the chart.The first option looks more likely, especially when you consider that it may be the cause of the second... :) Aleksey Vyazmikin 2018.07.04 14:18 #30 Total trash - got division by zero error again 2018.07.04 13:29:05.377 IndDrafter (Si-9.18,M15) zero divide in 'IndDrafter.mq5' (479,56) Code from ME as a picture - maybe I'm blind but I don't understand what's going on The error is still on the same line. double d1=(delta_price_high-center_line_point)/(limit/2); The file is the same, as the error line has shifted due to the addition of code for the print. 1234567891011 New comment
In general, profiling on historical data shows no errors.
In general, when limit=0 - print to log, in print - all components from which the variable limit is formed.
In general, when limit=0 - print to log, in print - all the components from which the variable limit is formed.
Something's messing me up today.
code
in the printer.
And where is the print withstart_index?
I'm having a bit of a glitch today.
code
in the printer.
Where's the print withstart_index?
Either it's in the logs, or the print isn't coming out of this part of the code at all.
Either in the logs, or the prints aren't derived from that part of the code at all.
So I opened the log file and there's only one line. Prints from here - I wrote this myself, and if you comment on the first print, it doesn't print any more.
I'm having a bit of a glitch today.
code
in the printer.
Where's the print withstart_index?
What does this have to do with optimization, the log from the terminal ...\MQL5\Logs
I erased the log for today - I'm waiting for the new data. Maybe that print really was with the wrong code.I'm having a bit of a glitch today.
code
in the printer.
Where's the printer with thestart_index?
Then that leaves 2 versions:
1. Poltergeist, black magic, machinations of sorcerer enemies.
2. this is the wrong version of indicator. Maybe you are writing in a copy and there is a different indicator on the chart.
What does this have to do with optimization, the log from the terminal ...\MQL5\Logs
If my memory serves me right, the Terminal: Toolbox - Experts tab forcibly smothers the over-zealous ones who VERY often shoot prints to the journal.
This leaves two versions:
1. Poltergeist, black magic, machinations of witchdoctors.
2. this is the wrong version of the indicator. Maybe you are writing in a copy, and there is another indicator on the chart.
The first option looks more likely, especially when you consider that it may be the cause of the second... :)
Total trash - got division by zero error again
Code from ME as a picture - maybe I'm blind but I don't understand what's going on
The error is still on the same line.
The file is the same, as the error line has shifted due to the addition of code for the print.