[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 65

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi all. Guys I have a condition to find a maximum: but within a corridor.
for (int max=1; max<1000; max++)
if (High[max+1] < High[max] && High[max] > High[max-1] && Low[max+1] < Low[max] && Low[max] > Low[max-1] &&
High[max] > low_level_s && High[max] < high_level_s) break;
it does not work.
if I remove corridor All ok:
for (int max=1; max<1000; max++)
if (High[max+1] < High[max] && High[max] > High[max-1] && Low[max+1] < Low[max] && Low[max] > Low[max-1] ) break;
What could be the problem...?
The script is in the "scripts" folder of the terminal (e.g., C:\Program Files\ FX Trader\experts\scripts).
The script can be placed on the chart of any instrument, any timeframe.
Open the indicator in two windows and set the unwanted line to the background colour.
5th forum // am I the only one who gets an error?
5th forum // am I the only one who gets an error?
Probably yes.
people, help me figure out what the heck this is! My Expert Advisor is designed to put out an oplot, and if the price does not reach it, but reverses to the level of its stop, the oplot should be deleted. but on the tester sometimes an oplot is put out and immediately deleted before it even reaches the stop. What is the problem? Here is a screenshot and deletion code.
Here is the code:
What is the error here?
And here's the code:
What is the error here?
I want to build an Expert Advisor for different timeframes.
I want to build an EA for different timeframes, send me a "fish".
best regards
No errors in the code, only logic errors. Bid>SL is checked and all the pending orders are deleted (where SL is taken from is not clear from the code). If something else is needed then the goal is stated step by step in understandable language.
SL is set at the level of MA20 with 3 candles backwards.
people, help me figure out what the heck this is! My EA is designed to put out an oplot, and if the price does not reach it, but reverses to the level of its stop, the oplot should be deleted. but on the tester, sometimes an oplot is put out and immediately deleted before it even reaches the stop. What is the problem? Here is a screenshot and deletion code.
Here is the code:
What is the error here?
replace
if (Bid>SL) {
at
and see what the log says.
replace
to
and see what the logbook says.
What's the point? The SL level is correct. When I set the SL variable to MA20 with a shift of 3, I output the SL level through Alert and it is always at the right level. I don't know why the order is deleted before reaching the SL level.