Weekend evening - page 28

 
yurabob:
I mean the following. I have opened (or rather, I have opened it manually) a buy order at 1000. The robot sets TP = 1,000 + spread + 20 (this is the TP level that I have specified in the parameters) = 1020 (I will not specify the spread so as not to confuse it). Then the price has moved to the level of 900 (let us assume that the distance from the previous order to open a new one I have specified is 100). The robot opens a new order. It calculates a breakeven point for both orders (let's assume that it will be at 950) and adds 20 to it, i.e. TP = 950+20=970.

Done:Breakeven manual positions.

 

Hello Vladimir!

I am asking you to write an EA working on pending Buy Stop and Sell Stop orders, which are triggered by sharp price changes, and the work algorithm is somewhat similar to Ambush Expert Advisor for MetaTrader 5, which you published earlier.

Initial data:

1. Trading platform - MetaTrader 5.

2. Number of decimal places - 5.

Timeframe - М1. 4.

Currency pair - any. 5.

Pending orders - one Buy Stop and one Sell Stop. 6.

6. mode of operation of the Expert Advisor - 5 days a week.

Time of beginning and end of work of the Expert Advisor - set in settings.

Variables in settings:

1. Indent - distance of pending orders from Bid and Ask levels.

2.Spread Max - maximum allowed spread.

3. Take Profit - profit fixing.

4. Stop Loss - fixing of losses.

5. TrailingStop - trailing stop.

6. Trailing Step - trailing step.

7. Wait - waiting in seconds for pending orders to move relatively to the current price. 8.

8. Start of work - time of advisor work start (in hours and minutes).

9. End of work - time of advisor stop (in hours and minutes).

10. Magic number - magic number of advisor.

When launching the Expert Advisor, one pending order Buy Stop and Sell Stop are immediately placed at the same distance from the levels Bid and Ask . In the settings, this distance is set with the variable Indent. If the price level moves smoothly upwards or downwards, both pending orders are also moved at the distance ofIndent with the expectation that at a sudden sharp movement one of the pending orders will trigger . To modify both pending orders, we need to add to the Expert Advisor settings the Wait mode for movingWait from 1 to 60 seconds. In order to avoid an unwanted and uncontrolled spread widening, Spread Max variable shall be applied in the EA settings. If the current spread suddenly becomes larger than the value initially set in the Spread Max variable, the pending orders placed earlier will be deleted immediately and new pending orders will not be placed until the spread returns to the specified value. If one of the pending orders triggers, the second order is immediately deleted. A new pending order can be set only on the next bar and only if there is no price gap. There is another important point: possibility to set time of start and end of working of the EA from 0 hours 00 to 23 hours 59 minutes in the settings. For each variableStart of work and End of work it is necessary to set hours and minutes separately.Stop Loss should be applied to fix the loss. To fix theprofit Take Profit. Besides, in the parameters of an EA it is necessary to enable TrailingStop with Trailing Step.

Sincerely, Vladimir.

 
MrBrooklin:

Hello Vladimir!

Please write an EA working on pending Buy Stop and Sell Stop orders, which are triggered by sharp price changes, and the work algorithm is somewhat similar to Ambush Expert Advisor for MetaTrader 5, which you published earlier.

Initial data:

1. Trading platform - MetaTrader 5.

2. Number of decimal places - 5.

Timeframe - М1. 4.

Currency pair - any. 5.

Pending orders - one Buy Stop and one Sell Stop. 6.

6. mode of operation of the Expert Advisor - 5 days a week.

Time of beginning and end of work of the Expert Advisor - set in settings.

Variables in settings:

1. Indent - distance of pending orders from Bid and Ask levels.

2.Spread Max - maximum allowed spread.

3. Take Profit - profit fixing.

4. Stop Loss - fixing of losses.

5. TrailingStop - trailing stop.

6. Trailing Step - trailing step.

7. Wait - waiting in seconds for pending orders to move relatively to the current price. 8.

8. Start of work - time of advisor work start (in hours and minutes).

9. End of work - time of advisor stop (in hours and minutes).

10. Magic number - magic number of advisor.

When launching the Expert Advisor, one pending order Buy Stop and Sell Stop are immediately placed at the same distance from the levels Bid and Ask . In the settings, this distance is set with the variable Indent. If the price level moves smoothly upwards or downwards, both pending orders are also moved at the distance of Indent with the expectation that at a sudden sharp movement one of the pending orders will trigger . To modify both pending orders, we need to add to the Expert Advisor settings the Wait mode for moving Wait from 1 to 60 seconds. In order to avoid an unwanted and uncontrolled spread widening, S pread Max variable shall be applied in the EA settings. If the current spread suddenly becomes larger than the value initially set in the S pread Max variable, the pending orders placed earlier will be deleted immediately and new pending orders will not be placed until the spread returns to the specified value. If one of the pending orders triggers, the second order is immediately deleted. A new pending order can be set only on the next bar and only if there is no price gap. There is another important point: possibility to set time of start and end of working of the EA from 0 hours 00 to 23 hours 59 minutes in the settings. For each variable Start of work and End of work it is necessary to set hours and minutes separately. Stop Loss should be applied to fix the loss. To fix theprofit Take Profit. Besides, in the parameters of an EA it is necessary to enable TrailingStop with Trailing Step.

Sincerely, Vladimir.

Ok, I will do. I will name my Expert Advisor Pending Stop Trailing

 

Thank you!

Sincerely, Vladimir.

 
Saturday evening today.

Greetings !!!

I would like to ask you to write an EA.
Requirement and indicators are in the attachment.

Regards.

I would like to ask you to write an EA.
 
azas111:
It is Saturday evening today.

Greetings!

I would like to ask you to write an EA.
Requirement and indicators are in the attachment.

Regards.

Boris.

Describe how you trade with this system? What are the entry/exit signals? What trading results and on which pairs?

 
Published
 

Thank you very much, Vladimir!

I will start testing it now.

Sincerely, Vladimir.

 
MrBrooklin:

Thank you very much, Vladimir!

I will make some tests.

Sincerely, Vladimir.

Only you should always set Stop Loss and Take Profit different from zero - otherwise you will have errors when modifying pending orders.

 
The strategy idea:

When the price is above the MA, only buy, below - sell.
The entry is performed when the impulse with the pullback occurs (a fractal appears) andan pending order is placed to break through the fractal.
Entry can also be made on the rebound from EMA233 after the impulse and formation of a fractal on its breakthrough.

It is advisable that the impulse that penetrated or rebounded from the MA breaks through the trend line.

The stop is placed behind the nearest opposite fractal.
The exit is at the trader's discretion.

22

Figure 22

According to Fig. 22:

The green rectangle is equal to the value of the eight-hour H1 candle, at the time from 07:00 to 12:00.

Area 1 - not working, price breaks through the box towards the muving.
Area 2 - do not work, time after 16:00.
Points 3, 4 - pending sell order, price breaks the muving and rebounds from it.
Points 5, 6 - pending buy order, breach of the muving and rebound from it.
At points 4 and 6, positions will be opened by your Expert Advisor.
Points 7, 8 - positions will (or will not) be opened manually, according to SAR_Price_Targets indicator data.
Points 9,10 - positions will be opened by Expert Advisor.

The work is done using the pattern shown in Figure 33,

22

Fig. 33

where

EMA233 is a dashed line.
Shaded channel = EMA144 and EMA169.
An indicator with profit levels.
Basement indicator with parameter 21.

All this is on MT4, I don't have one for MT5.

Exit of trades - by indicator with profit levels, very often just by gut feeling.
Instruments that I use for trading are visible below the charts. I do it occasionally.
I cannot boast of the trading results, there is a reason for that.

Regards.

Boris.

Совершение сделок - Торговые операции - MetaTrader 5
Совершение сделок - Торговые операции - MetaTrader 5
  • www.metatrader5.com
Торговая деятельность в платформе связана с формированием и отсылкой рыночных и отложенных ордеров для исполнения брокером, а также с управлением текущими позициями путем их модификации или закрытия. Платформа позволяет удобно просматривать торговую историю на счете, настраивать оповещения о событиях на рынке и многое другое. Открытие позиций...
Files:
22.png  45 kb
33.png  27 kb
Reason: