"Bot Vasya" - input parameters.

5 May 2024, 08:25
Oleg Popov
0
181

Bot Vasya.

The "Bot Vasya" Expert Advisor is a tool that allows users to create their own strategies for trading on the Forex market. It has many useful functions.

Some of the Adviser's strategies are based on the principle of buying when oversold and selling when an asset is overbought. This means that the EA will purchase an asset when its price is too low and sell when the price is too high.

Many people have probably noticed (or know) that after each trend in the market, there is usually a price pullback. First, the price moves up and then down, or vice versa. The ADVISOR seeks to identify such pullbacks and use them to make a profit.

In addition, the Expert Advisor uses various methods for calculating the volume of a transaction when restoring unprofitable positions, which allows users to choose the most suitable option for them. There are also several types of averaging (loss recovery) available in the Expert Advisor, which can be useful in different market situations.

You can get more detailed information about the adviser's work in the strategy tester. To do this, it is enough to have a demo version.

Checking the Expert Advisor in the tester allows you to better understand how it will behave in various situations with specific settings. Thanks to the tester, you can see how changing the settings affects the results of the adviser's work.

I understand that learning how to work in a tester may take some time. However, believe me, it will help you save a lot of money and better understand Forex trading.

** General **   – general settings used for both initial and averaging orders.

The magic number

– Magic number of the order. Used as a user-defined identifier. Using this number, the advisor finds his orders with which he is allowed to work.

StopLoss (point)

– stop loss level for each order placed by the advisor.

UseIndicator

– selecting an indicator for starting from the proposed ones:

PointZigZag

– the “Point Zig Zag” indicator with the “ Minimum Pullback Size (point) ” settings is used.

The indicator needs to be installed in the terminal. To test the advisor, it is enough to install the demo version of the “Point Zig Zag” indicator. Attention! After installing the i_PointZigZag indicator , check the installation location: MQL4 > Indicators > Market > Point Zig Zag.ex4

ZigZag

– the standard “Zig Zag” indicator with the “ Depth (for i_ZigZag) ” settings is used.

Ratio Trend/Pullback =

– the ratio of the size of the expected trend to the “ Minimum Pullback Size (point) ” value. Using this, we determine the size of the current trend to begin with.

Minimum Pullback Size (point)

– Estimated Minimum Rollback Size (in point), from the last Extreme.

Depth (for i_ZigZag)

– setting the standard “Zig Zag” indicator.

** Startup ** – Settings used for initial orders.

UseForStart

– choosing a strategy for starting from the proposed ones:

  (#1)BUY-if No Position
– EA only opens Buy orders. Conditions: There are no open Buy orders.

  (#2)SELL-if No Position
– EA only opens Sell orders. Conditions: There are no open Sell orders.

(#3)BUY & SELL-if No Position

– EA opens Buy and Sell orders.
Conditions for opening a Buy order: There are no open Buy orders.
Conditions for opening a Sell order: There are no open Sell orders.

(#4)i_ZigZag + Bar

- Conditions:
The size of the last segment corresponds to the specified settings.
The price (Bid) has rolled back from the Extreme and is in the range specified by the parameters settings   MomentumBackSt_SizeMin   And   MomentumBackSt_SizeMax .
You should pay attention to the parameter value   MomentumBackSt_SizeMax , if it is too small or equal to 0 (zero), then the following condition cannot be satisfied:
For Buys – the price (Bid) is greater than the price (High) of the previous candle of the current period.
For Sales – the Price (Bid) is less than the price (Low) of the previous candle of the current period.

(#5)i_ZigZag + Line

The trend line established by EA is used.

- Conditions:
For Purchases – the Bid price is less than the trend line price.
For Sales – the Bid price is greater than the trend line price.
The price (Bid) has rolled back from the Extreme and is in the range specified by the parameters settings   MomentumBackSt_SizeMin   And   MomentumBackSt_SizeMax .

(#6)i_ZigZag + Momentum

– The rollback impulse is used.
Conditions:

The size of the last segment corresponds to the specified settings;
The price (Bid) has rolled back from the Extreme and is in the range specified by the parameters settings   MomentumBackSt_SizeMin   And   MomentumBackSt_SizeMax .

(#7)i_ZigZag + Extremum

– The moment of breakout of the nearest extremum level of the standard ZigZag indicator is used.

(#8)i_LevelReversal

– The moment of breakdown of the reversal level of the original PointZigZag indicator is used (installation in the terminal is required). To test the advisor, it is enough to install the demo version of the indicator.

Attention! After installing the i_PointZigZag indicator, check the installation location: MQL4 > Indicators > Market > Point Zig Zag.ex4

  (#9)Own Trend Line

- The moment of breakout of the trend line set by the user to a specified level is used.

Terminal/Trade/No orders

– choice (true/false). Setting initial (start) orders is allowed only if there are no open or pending orders in the terminal.

startHOUR   startMINUTE   stopHOUR   stopMINUTE

– time allowed for placing initial (starting) orders.

Lot size (for the starting order)

– desired volume for the initial (starting) order.

Note: The value may be limited by broker requirements (minimum and maximum lot size).

TakeProfit (point)

– profit level for the initial (starting) order.

If the value is 0 (zero), the [tp] level is not set.

MomentumBackSt_SizeMin

– the minimum size (in point) of the reverse impulse from the last Extreme is used to establish a position (trade) against the trend.

MomentumBackSt_SizeMax

– the maximum size (in point) of the reverse impulse from the last Extreme is used to establish a position (trade) against the trend.


**Averaging**   - Recovering losses using averaging positions.

Averaging is a trading option in which the advisor strengthens a losing position. This means that if you entered a sell position and the price went up, after a certain time the advisor sells again, adding another one to the already unprofitable position. The purpose of averaging is to open a position at a better price.

It is important to remember that averaging is an aggressive trading method that can lead to the loss of your deposit. It is important to follow the rules of risk management here.

UseForAverage

– choosing a strategy for opening averaging orders from the ones proposed below:

Not

– averaging of losing orders is prohibited.

Fixed_Distance

Conditions: The price has moved against us by a specified distance (“ Distance (for Grid_Average) ” parameter) from the extreme position.

Bar_Distance

Conditions:

    • The price moved against us at a specified distance (parameter “ Distance (for Grid_Average) ”) from   extreme position   .
    • For Buys – the price (Bid) is greater than the price (High) of the previous candle of the current period.
      For Sales – the Price (Bid) is less than the price (Low) of the previous candle of the current period.
OpenBar_Distance

Conditions:

    • The price moved against us at a specified distance (parameter “ Distance (for Grid_Average) ”) from   extreme position   .
    • The price (Open) of the current bar of the current period is at a distance from the extreme order greater than the value of the “ Distance (for Grid_Average) ” parameter.
Momentum_Distance

Conditions:

    • The price moved against us at a specified distance (parameter “ Distance (for Grid_Average) ”) from   extreme position   .
    • The price (Bid) has rolled back from the Extreme and is in the range specified by the parameters settings   MomentumBackAv_SizeMin   And   MomentumBackAv_SizeMax .
Type of averaging lot calculation

– choice from the options below, the option of calculating the lot of the averaging order.

Series

– Variables are used: “ Lot size (for the starting order) ”; “ Martin (only for Series) ”; “ Number of orders in the series(only for Series) ”;

Auto

– the calculation is based on a goal ( TargetAveraging_money ) that the advisor must achieve from the moment the initial order is opened, taking into account the input settings ( Minimum Pullback Size (point)   And   Distance (for Grid_Average) ).

Series_Auto

Required condition!!! Availability of an open position.
Skipped levels are ignored. The following variables are used in the calculations: “ Lot size (for the starting order) ”, “ Number of orders in the series(only for Series) ”, “ Martin (only for Series) ”, “ Distance (for Grid_Average) ”.

TargetAveraging_money

– the value of the goal in money, when averaging.

MomentumBackAv_SizeMin

– the minimum size of the rollback impulse.

MomentumBackAv_SizeMax

– maximum size of the rollback impulse.

Distance (for Grid_Average)

– minimum distance for placing averaging orders.

Martin (only for Series)

– coefficient of increase in volume during averaging.
Applies if: “ Type of averaging lot calculation ” ==   Series ;
Or: “ Type of averaging lot calculation ”==   Series_Auto .

Number of orders in the series(only for Series)

– desired number of orders in a series

Applies if: “ Type of averaging lot calculation ” ==   Series ; Or: “ Type of averaging lot calculation ” ==   Series_Auto .

TakeProfit (for Grid_Average)

– TakeProfit value in points for averaging positions.

MaxLot (for Grid_Average)

– the maximum allowed value of the lot size for averaging.

Use Pyramid of profitable averaged orders

– choice (true/false), use a pyramid of profitable averaged orders.

Distance_Pyramid (point)

– minimum distance for placing Pyramid orders.

Step Trailing for Pyramid (point)

– trailing stop step for profitable positions.

**Closing**

CloseAveraging_Avto – selection (true/false).

Closing when the segment (trend) direction changes, if the money target specified in the “ TargetAveraging_money ” parameter setting is achieved.

Minimum Profit(%) (in the cycle)

– close orders when a specified percentage of profit is reached. The value must be greater than 0%, but not more than 100%. If the value is 0%, the function is not used.

Formula and condition:

                А = the sum of the profit of open orders (with a positive profit) and closed orders (with a positive profit).

                В = the total amount of profit of all open orders (with any profit) and closed orders (with any profit)

The condition for closing orders:

                 В / (А / 100) >= “Minimum Profit(%) (in the cycle)”

Note: The feature is currently in testing.

**Display**

Display RIGHT_UPPER information
– selection (true/false), show information about the settings on the graph (upper-right corner).

Display RIGHT_LOWER information

– selection (true/false), show additional information on the chart (lower-right corner)

**Buttons**

– Purpose of the buttons located in the lower right corner of the chart.

All buttons are relevant both when testing in the tester and when trading in the terminal.

"op_SELL"

– opening only the initial Sell position. The lot size, stop loss and take profit levels are used from the settings ( Startup ). A button is active when it is green, and a button is inactive when it is red.

Note: when the button is red, it is pressed, but the position is not opened.

"op_BUY"

– opening only the initial Buy position. The lot size, stop loss and take profit levels are used from the settings ( Startup ). A button is active when it is green, and a button is inactive when it is red.

Note: when the button is red, it is pressed, but the position is not opened.

"Close All"

– closes all open positions of a given EA on a given instrument and stops the operation of the EA.

"EA is ON/OFF"

– starting and stopping EA.
Green button and inscription   “EA is ON”   - EA works.
Red button and inscription   “EA is OFF”   – EA is turned off.



Share it with friends: