Weekend evening - page 19

 
Vladimir Karputov:

Arethe numbers bar numbers?

Yes, that's right.
 
Vladimir Baskakov:
Hello, I have an idea for a non-syndicator EA. The strategy is as follows:

Buy
Low2<Low26
Low1>Low26


Sell
High2>High26
High1<High26.

This is a pivot model, may be something else to add.

I think it would be useful to enter the "Work timeframe" parameter in order to find the best variant. At the specified timeframe we will look for a new bar and check the trading signals at the specified timeframe. Bars #1 and #2 are fixed in the code, while "26" is an adjustable parameter.

 
Vladimir Karputov:

I think it will be useful to enter the "Work timeframe" parameter to find the best option. At the specified timeframe a new bar is looked for and trading signals are checked at the specified timeframe. Bars #1 and #2 are fixed in the code, while "26" is an adjustable parameter.

Well, yes, it would be convenient to test "by opening prices", quickly
 
Vladimir Baskakov:
Well, yes, it would be convenient to test "by opening prices", quickly
You may test at opening prices only if:
- Stop Loss, Take Profit and Trailing are not used
- Positions are closed only when a new bar is born
- ...
 
Vladimir Karputov:
You may test by the opening prices only if:
- Stop Loss, Take Profit and Trailing are not used
- Positions are closed only when a new bar is born
- ...
I see, well, trailing is obviously not a problem here.
 

5m4GaJ.mq5

version "1.000"


Trade signals:

BUY: Low #2 < Low #Indexleft bar AND Low #1 > Low #Indexleft bar

SELL: High #2 > High #Indexleft bar AND High #1 < High #Indexleft bar


Of interest: ... for searching of the best variant, the"Work timeframe" parameter is introduced. At the specified timeframe a new bar is searched for and trading signals are tested at the specified timeframe. Bars #1 and #2 are fixed in the code, while "26" is an adjustable parameter.

Files:
5m4GaJ.mq5  78 kb
 
Vladimir Karputov:

5m4GaJ.mq5

version "1.000"


Trade signals:

BUY: Low #2 < Low #Indexleft bar AND Low #1 > Low #Indexleft bar

SELL: High #2 > High #Indexleft bar AND High #1 < High #Indexleft bar


What?! Already!? Like on Formule 1
 
Vladimir Baskakov:
What? Already!? Like Formule 1.
It's actually not instant ✈️ at all. Half a day at least.
 
Vladimir Karputov:
It's not actually instant ✈️ at all. Half a day, after all.
Cool as ever!
 
Vladimir Baskakov:
Cool as always!

Have you tested it yet? Any sketches?