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

 
Reshetov:
No one forbids it. There is a tester grail somewhere in the Code Base. There's just one pass in the tester and the next pass on the story will already be fine.
I'll take a look, thanks. The main thing is that this grail does not record dates and times and position directions, but actually tests takes and stops.
 
If I'm not mistaken - this "grail" is also called "self-tuning advisor" - look it up.
 
leonid553:
If I'm not mistaken - this "grail" is called "self-tuning EA" - look it up in the search engine.

OK, thank you, Leonid.

I want to check one idea.

 

Remembered! - a self-learning expert. https://www.mql5.com/ru/code/9431

https://www.mql5.com/ru/code/9416

 
artmedia70:

int iHighest( string symbol, int timeframe, int type, int count=WHOLE_ARRAY, int start=0)

Returns index of the highest value found(offset from the current bar).

Isn't that what you need?


Well, yes, of course! Thank you!)
 

Now here's my problem...

extern double TakeProfit=20;
extern double Lots=1;
extern double Profit ;

................

Profit=TakeProfit*Point;

....

Соответственно

if AccountProfit()>=Profit)...

закрываемся.

It's giving out a value of 0.002.

So all the trades are flying.

Where did I go wrong?

Where do I fix the value of Points and Lots?

 
DOCTORS:

Now here's my problem...

...

It gives a value of 0.002

All the deals are flying.

Where did I go wrong?

Everywhere
 
Reshetov:
Everywhere

Yes I see, trying to prescribe Profit=TakeProfit*Point; after opening a trade... There is practically no change.
 
Does anybody know a way to place a pending orderin Meta Trader 4 at a certain 1-hour candle price, i.e. not at the time when it will open, but at the opening price of the candle?
 
kellin:
Does anyone know a way to place a pending orderin Meta Trader 4 at a specific 1-hour candle price, i.e. not at the time it opens, but at the opening price of the candle?
There is a way. You buy a time machine and put it on the price at which the candle opens.
Reason: