[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 1072

 
must interrupt at the change of second
 

while is executed as long as true

in your case True always until sec and Seconds() are equal

more precisely, go like this

         while(sec==Seconds())
         .....
 
problem solved, it turns out Second() updates on ticks instead of every second :)
 
Anyone! How to change the level of stops in the tester (symbol properties). This morning the level of stops on EURUSD is 300p and is not decreasing. When testing, the advisor works with these parameters and constantly error 130!
 
prom18:
Anyone! How to change the level of stops in the tester (symbol properties). This morning the level of stops on EURUSD is 300p and is not decreasing. When testing, the advisor works with these parameters and constantly error 130!
What are the stop levels ? If stop-loss and take-profit, they are changed in the programme manually or, if they are output to an external variable, in the tester "Expert properties" in the tab "Input parameters".
 
Also related to the previous question: how to dynamically change the "spread" symbol property when testing. Without it when testing on distant historical data you get unrealistic profitability, because the volatility is higher there. I think the spread was different back then. Seems like a logical spread = 0.4*ATR on a minute chart
 
volshebnik:
What are the stop levels ? If stop-loss and take-profit, they are changed manually in the program or, if they are output to an external variable, in the tester "Expert Advisor Properties" in the "Input parameters" tab.
Comrade wasn't referring to external variables, but to value returned by MarketInfo(Symbol(), MODE_STOPLEVEL), I think...
 
Can't insert picture, see here http://zalil.ru/30215858
 
Hello. Please help me with this indicator. I've been struggling for five days now. I can't figure out why it's not working. I made it to determine the true fractal. The model of true fractal is considered when the smallest price fell from the highest value two days ago by the value of 0.382 or 0.618, calculated between the peak and the lowest price four days ago. It is an upside fractal. For each fractal I check the values of its "edges": High{3} Low{5} Low{1} d=[ High{3}-Low{1} ] / [ High{3}-Low{5} ] if (0.382
 
Hello. Please help me with this indicator. I've been struggling for five days now. Not
I can't figure out why it's not working.
I made it to determine the true fractal. The model of a true fractal
counts when the lowest price fell from the highest two days
or 0.618, calculated between the peak and
the lowest price four days ago. It is an up fractal. For the lower one it is the other way round.
For each fractal I check the values of its "krails":
High{3}
Low{5} Low{1}


d=[ High{3}-Low{1} ] / [ High{3}-Low{5} ]
if (0.382<d<0.618) then fractal Up is true and put the value.
The calculation seems to be correct but it does not work. Maybe I marked it wrong.
variables?
Files:
4_1.mq4  3 kb
Reason: