[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 309

 
artmedia70:


Thank you very much, it really worked, I put 11 in and everything worked, thank you again
 

Pro, please advise, I am testing the expert for 2 months, deals should be every day (term from 23.08.10 to 23.10.10). The tester shows me the results, that there were only 10 deals, and the last only 03.09.10) Shows a profit. But I connect the visualization, there are 20 deals and a loss.

 
ikatsko:
Again, sorry: Maybe someone has already done this? Need function: there is tick up - tickUP=1 (tickDN=0) and there is tick down - tickDN=1 (tickUP=0) (maybe it will be one variable)
Here, Integer has something similar . As a base. Instead of stochastic, just put difference (Close[0]-Close[1]).
 
ikatsko:
Again, sorry: Maybe someone has already done this? Need function: there is tick up - tickUP=1 (tickDN=0) and there is tick down - tickDN=1 (tickUP=0)(maybe it will be one variable)

For your purposes you need to remember the past tick and the current tick. I want to warn you that this method will only work successfully on demo or real. The strategy tester is designed so there is no ticks or random generation of ticks (the same "gibberish" in a row). Try to upload a minute history and run owl with only Print(",Bid," ",Ask);

double TickLast=TickNow;

double TickNow=Bid; 

if (TickNow>TickLast) { tickUP=1; tickDN=0; }

if (TickNow<TickLast) { tickUP=0; tickDN=1; }

if (TickNow==TickLast) { tickUP=0; tickDN=0; }

 
 
granit77:
Integer has something similar here . As a basis. Instead of stochastic, just put the difference (Close[0]-Close[1]).
Lied. I forgot that it is on a tick chart so Close[0]-Close[1] is a tick and it is a bar. For normal chart I should use the construction suggested by Sys15975382.
 
granit77:
Lied. I forgot that I have it on tick chart, so Close[0]-Close[1] is a tick or bar. For the regular chart I should use the construct suggested by Sys15975382.

Where can I find it (the construct)?
 
todem:
is where to find it (the design)?
Here. :))
 
granit77:
Here. :))

Thanks!
 

Folks, please advise.

I'm writing a simple stochastic EA. I have a problem, how to implement this scenario:


If the value of the parameter reaches 19, then this parameter is monitored and when it crosses 21, it is bought.

It is not clear how to do what is underlined.


Thanks in advance for the advice.

 
piratpirat:

Folks, please advise.

I'm writing a simple stochastic EA. I have a problem, how to implement this scenario:


If the value of the parameter reaches 19, then this parameter is monitored and when it crosses 21, it is bought.

It is not clear how to do what is underlined.


Thanks in advance for the advice.


see the tutorial here carefully and do the intersection by analogy.
Reason: