Weekend evening - page 44

 

The vertical line is an example of an entry after crossing. ignore the trade

Hello Vladimir. Would you be interested in implementing the following trading idea? To open trades on a currency pair, when the base currency index crosses with the quoted currency index. To close the position and at the same time to enter into the opposite direction trade, when the indexes are crossed in the opposite direction. Parameters: 1. Currency pairs that participate in trading. 2. The number of points at which we put Breakeven. 3. Trailing stop. 4. Time interval within the day, when we do not open deals due to low volatility.

https://ru.wikipedia.org/wiki/Индекс_доллара

https://ru.wikipedia.org/wiki/Индекс_евро calculation of idex GBP, CHF, CAD, AUD, JPY is similar to EUR.

 
Vladimir Kononenko:

Hello Vladimir. Would you be interested in implementing the following trading idea? To open trades on a currency pair, when the base currency index crosses with the quoted currency index. To close the position and at the same time to enter into the opposite direction trade, when the indexes are crossed in the opposite direction. Parameters: 1. Currency pairs that participate in trading. 2. The number of points at which we put the Breakeven. 3. Trailing stop. 4. Timeframe within the day, when you do not open orders due to low volatility.

https://ru.wikipedia.org/wiki/Индекс_доллара

https://ru.wikipedia.org/wiki/Индекс_евро The calculation of the GBP, CHF, CAD, AUD, JPY indices is similar to the EUR.

Indices have different values and do not overlap.

Пользовательские финансовые инструменты - Для продвинутых пользователей - MetaTrader 5
Пользовательские финансовые инструменты - Для продвинутых пользователей - MetaTrader 5
  • www.metatrader5.com
Торговая платформа позволяет создавать собственные финансовые инструменты. По ним можно просматривать графики и проводить технический анализ, их можно использовать для проверки торговых роботов и индикаторов в тестере стратегий. Если ваш брокер не предоставляет инструмент, на котором вы хотели бы проверить свою стратегию, или же предоставляет...
 
Vladimir Karputov:

The indices have different values and do not overlap.

Vladimir, I forgot to tell you that I suggest to put the matching point of the indices into variables, for example 8.00h. there is an indicator on this topic. on the screenshot above, the intersecting curves of the two indices.

Thank you, I have synthetics implemented.

 

Hello Vladimir!

Interested in porting an EA from MT4 to MT5. Ready to be a tester. Source code is attached to this message. Found it on the Internet

Expert Advisor Specifications

Platform:MT4
Currency pairs: EURUSD, GBPUSD preferred

Time frame: M5
Working time: 24 hours a day

A fundamental important point: the Expert Advisor trades in buy and sell mode simultaneously. In addition, the Expert Advisor has different magic orders written in the settings - so the user does not have to change anything (different magic numbers are needed for the bot to correctly track sell orders and buy orders - no confusion).


EA strategy

The Expert Advisor uses the martingaleprinciple. It trades simultaneously in buying and selling from the same instrument chart.RSI oscillator readings are taken into account to enter the trade (as I understand it relies on the values of the variables in the code RsiMinimum and RsiMaximum). After the installation of the EA and permission to trade - after some time (maybe 15 minutes after the start, sometimes almost immediately) it opens a couple oforders to buy and sell.

If the day appears to be very flat - there is no evident movement in this or that direction - and the price does not reach the level specified in the settings for opening the next order (the StepMinvariable ) - then the pair of buy and sell orders will be there all day long.

The important feature is that stop loss and take profit orders do not have orders initially. Then, depending on whether the market will move up or down, the EA starts to open new orders against the trend; if the market moves up, the EA sells; if it moves down, the EA buys; everything here is the same as with all martingale, without exceptions. And in this case (from the second order opened against the trend) there is a Take Profit order. Then as soon as the price pulls back, the Expert Advisor will close the order(s) according to Take Profit and the market will again have a couple of Buy and Sell orders without a Stop order and Take Profit order.

Next, the Expert Advisor will repeat on a new trend all of its actions described above.

Please note that after the grid of orders is closed by the Expert Advisor, the step between buy and sell orders will increase. And this will happen every time after the grid is closed. The distance between orders depends on the market volatility, it may be up to 50-70 points. And further, the EA will have to wait for more volatility in order to "swing" it.

Expert Advisorstarts to increase the lot beginning from the third order, and the first and second orders go with the lot, which is set in the settings (the variable Lots )- this is a very important detail.

The option of a variable step between orders is implemented in the Expert Advisor. The user can set the distance from the opening of one order to the opening of the next order, as well as select an order and specify how many points to add to the existing step between orders - this is a very useful option, especially with a strong failure.

Files:
Sovetnik.mq4  21 kb
 
ymsssg:

Hello Vladimir!

Interested in porting an EA from MT4 to MT5. Ready to be a tester. Source code is attached to this message. Found it on the Internet

Expert Advisor Specifications

Platform:MT4
Currency pairs: EURUSD, GBPUSD preferred

Time frame: M5
Working time: 24 hours a day

A fundamental important point: the Expert Advisor trades in buy and sell mode simultaneously. In addition, the Expert Advisor has different magic orders written in the settings - so the user does not have to change anything (different magic numbers are needed for the bot to correctly track sell orders and buy orders - no confusion).


Expert Advisor Strategy

The Expert Advisor uses the martingaleprinciple. It trades simultaneously in buying and selling from the same instrument chart. RSI oscillator readings are taken into account to enter the trade (as I understand it relies on the values of the variables in the code RsiMinimum and RsiMaximum). After the installation of the EA and permission to trade - after some time (maybe 15 minutes after the start, sometimes almost immediately) it opens a couple of buy and sell orders.

If the day appears to be very flat - there is no evident movement in one or another direction - and the price does not reach the level specified in the settings for opening the next order (the StepMinvariable ) - then the pair of buy and sell orders will be there all day long.

The important feature is that stop loss and take profit orders do not have orders initially. Then, depending on whether the market will move up or down, the EA starts to open new orders against the trend; if the market moves up, the EA sells; if it moves down, the EA buys; everything here is the same as with all martingale contracts, without exceptions. And in this case (from the second order opened against the trend) there is a Take Profit order. Then as soon as the price pulls back, the Expert Advisor will close the order(s) according to Take Profit and the market will again have a couple of Buy and Sell orders without a Stop order and Take Profit order.

Next, the Expert Advisor will repeat on a new trend all of its actions described above.

Please note that after the grid of orders is closed by the Expert Advisor, the step between buy and sell orders will increase. And this will happen every time after the grid is closed. The distance between orders depends on the market volatility, it may be up to 50-70 points. And further, the EA will have to wait for more volatility in order to "swing" it.

Expert Advisorstarts to increase the lot beginning from the third order, and the first and second orders go with the lot, which is set in the settings (the variable Lots )- this is a very important detail.

The option of a variable step between orders is implemented in the Expert Advisor. The user can set the distance from the opening of one order to the opening of the next one, as well as select an order and specify how many points to add to the existing step between orders - this is a very useful feature especially in case of a strong failure.

Accepted. It will be called "Advisor mild martingale". Mild martingale.

 
Vladimir Karputov:

Accepted. Will be called Advisor mild martingale. Soft martingale.

Here are the first results on EURUSD, H1:

Advisor mild martingale

I still have to add a panel with buttons...

Files:
 

Great!

Put in a demo account with Alpari broker, 5 decimal places. It's been 1 hour - the flight is normal. No problems detected yet.

 
ymsssg:
Oh, that's great!

Great is great, but Martingale doesn't do any good :)

By the way, do I need to attach a panel with buttons? And if so, which ones?

 

I came across the following situation: we have two SELL and one BUY positions


When there was an opportunity common Take Profit for both SELL positions could not be set (the reasons may be different - in this section the positions just happened to be very close and there was a modification ban). And there may be reasons like this: there is no light, or computer has stopped working...


I will consider how to deal with such situations ...

 
The panel with buttons is unnecessary, imho. The only useful indicator is the lighted one under it showing the value of loss/profit and in brackets - the number of open orders in each directionOpen order indicator. It shows whether the Expert Advisor is in red or in surplus at the moment, according to the results of open trades.

And it would be great to see text informationService information. I.e. Initial minimum lot, lot multiplier, step in pips between orders, after how many pips the next order will open, what is ATR I do not understand, and Balance - how much money is in the account, the second seems to be what MT writes as just "Funds" under trades and the third seems to be the free margin. Status - is also not required, it shows whether the EA is enabled or disabled.

Reason: