Sapphire Strat Maker - Indicators documentation

Sapphire Strat Maker - Indicators documentation

13 March 2024, 02:04
Emanuel Cavalcante Amorim Filho
0
164

1. Introduction

This is the continuation of the documentation for Sapphire Strat Maker and Sapphire Strat Maker Alt (Free) expert advisor - an EA which allows you to create your own strategy without coding. This is the beauty of this Expert Advisor: create your own strategies - be creative - and don't be locked to a single strategy anymore. Optimize the parameters you want to find the best sets and you're ready to go!


Feel free to contact me if you have any question about the documentation or need help to create a strategy.


2. Blog posts

Read the general documentation and the other blog posts to know more about it. Next, I'm comming with the Enums documentation, where each enum has a numerical representation that can be used in the indicator.



3. Available indicators




How to interpret the values? Check out the next screenshot:



As we can see from the next sections, moving averages have 4 parameters, which range from 1 to 4. In the documentation, the numbers in front of the line represent the number of the param, while to the side we have the possible input value type. In the case of moving averages (section 3.6), the param 1 is the period (int type), the second is the shift (int type), the third is the method (ENUM_MA_METHOD enum type) and the fourth is the price (ENUM_APPLIED_PRICE enum type).

Remember that:

    • int, for this EA purpose, always range from negative infinity to positive infinity, but only includes integer numbers;
    • double, for this EA purpose, always range from negative infinity to positive infinity, and can include floating point values (i.e. numbers with comma);
    • ENUMs represent are just a textual representation of a number and can only be defined in a pre-defined range; if we set an ENUM parameter type to a value greater than the estabilished in the docs. (check the ENUM docs. above), you may get an undefined error.


You may also download the file attached to this post. It contains an HTML file with the indicators/parameters. In the next sections I'll explain some of the indicators not shipped with Metatrader 5.

In case you need help with the original Metatrader 5 indicators, check this Metatrader 5 help page to know more about the desired indicator and this MQL5 documentation page to know more about the parameters. If any questions persists, do not hesitate to reach out to me.


3.1. Bollinger Bands

    1. Period (int)
    2. Deviation (double)
    3. Shift (int)
    4. Price (ENUM_APPLIED_PRICE)


3.2. Donchian Channels

    1. Period (int)
    2. Shift (int)


3.3. Midpoint Bands

    1. Period (int)
    2. Shift (int)


3.4. Keltner Channels

    1. Period (int)
    2. Deviation (double)
    3. Shift (int)
    4. Price (ENUM_APPLIED_PRICE)
    5. Method (ENUM_MA_METHOD)

3.5. Envelope

    1. Period (int)
    2. Deviation (double)
    3. Shift (int)
    4. Price (ENUM_APPLIED_PRICE)
    5. Method (ENUM_MA_METHOD)


3.6. Moving Average

    1. Period (int)
    2. Shift (int)
    3. Method (ENUM_MA_METHOD)
    4. Price (ENUM_APPLIED_PRICE)


3.7. Double Exponential Moving Average (DEMA)

    1. Period (int)
    2. Shift (int)
    3. Price (ENUM_APPLIED_PRICE)


3.8. Triple Exponential Moving Average (TEMA)

    1. Period (int)
    2. Shift (int)
    3. Price (ENUM_APPLIED_PRICE)



3.9. Adaptive Moving Average (AMA)

    1. Period (int)
    2. Fast MA Period (int)
    3. Slow MA Period (int)
    4. Shift (int)
    5. Price (ENUM_APPLIED_PRICE)



3.10. Ichimoku Clouds

    1. Tenkan Sen (int)
    2. Kijun Sen (int)
    3. Senkou span b (int)



3.11. Parabolic SAR

    1. Step (double)
    2. Maximum Step (double)



3.12. Average True Range (ATR)

    1. Period (int)


3.13. Standard Deviation (StdDev)

    1. Period (int)
    2. Shift (int)
    3. Price (ENUM_APPLIED_PRICE)
    4. Method (ENUM_MA_METHOD)


3.14. ADX

    1. Period (int)

3.15. Relative Strength Index (RSI)

    1. Period (int)
    2. Price (ENUM_APPLIED_PRICE)

3.16. William's Percent Range (WPR)

    1. Period (int)

3.17. Bollinger Bands % 

    1. Period (int)
    2. Deviation (double)
    3. Shift (int)
    4. Price (ENUM_APPLIED_PRICE)

3.18. Slow Stochastic

    1. kPeriod (int)
    2. dPeriod (int)
    3. Slowing (int)
    4. Method (ENUM_MA_METHOD)
    5. Stochastic price type (ENUM_STO_PRICE)


3.19. Volume Weighted Moving Average (VWMA) 

    1. Period (int)
    2. Shift (int)
    3. Price (ENUM_APPLIED_PRICE)
    4. Volume (ENUM_APPLIED_VOLUME)


3.20. Double Moving Averages 

    1. Period MA 1 (int)
    2. Period MA 2 (int)
    3. Shift MA 1 (int)
    4. Shift MA 2 (int) 
    5. Price MA 1 (ENUM_APPLIED_PRICE)
    6. Price MA 2 (ENUM_APPLIED_PRICE)
    7. Method MA 1 (ENUM_MA_METHOD)
    8. Method MA 2 (ENUM_MA_METHOD)

3.21. Commodity Channel Index (CCI)

    1. Period (int)
    2. Price (ENUM_APPLIED_PRICE)


3.22. Awesome Oscillator

No parameters


3.23. Money Flow Index (MFI) 

    1. Period (int)
    2. Volume (ENUM_APPLIED_VOLUME)


3.24. Force Index

    1. Period (int)
    2. Volume (ENUM_APPLIED_VOLUME)
    3. Method (ENUM_MA_METHOD)


3.25. Moving Average Divergence Convergence (MACD) 

    1. Fast MA Period (int)
    2. Slow MA Period (int)
    3. Signal Period (int)
    4. Price (ENUM_APPLIED_PRICE)


3.26. Summation of two series (+) 

    1. Indicator index 1 or Indicator series code (int) - check section 4.4. for more info
    2. Indicator buffer 1 (int)
    3. Indicator index 2 or Indicator series code (int) 
    4. Indicator buffer 2 (int)


3.27. Subtraction of two series (+) 

    1. Indicator index 1 or Indicator series code (int) - check section 4.4. for more info
    2. Indicator buffer 1 (int)
    3. Indicator index 2 or Indicator series code (int) 
    4. Indicator buffer 2 (int)

3.28. Multiplication of two series (+) 

    1. Indicator index 1 or Indicator series code (int) - check section 4.4. for more info
    2. Indicator buffer 1 (int)
    3. Indicator index 2 or Indicator series code (int) 
    4. Indicator buffer 2 (int)

3.29. Division of two series (+) 

    1. Indicator index 1 or Indicator series code (int) - check section 4.4. for more info
    2. Indicator buffer 1 (int)
    3. Indicator index 2 or Indicator series code (int) 
    4. Indicator buffer 2 (int)


3.30. Custom indicator

    1. NUMBER OF BUFFERS (int) - the first parameter shall always be the number of buffers.
    2. The rest of the parameters follow the indicator order and type.


4. Indicators


4.1. Midpoint Bands

This indicator is simply calculated by taking the highest high and the lowest high of the last N periods. The result is divided by 2. The same is done with the low prices - it takes the highest low and lowest low and divides by two. And then we get the Midpoint Bands.


4.2. Bollinger Bands %

This is simply a Bollinger Bands represented as a %. The upper band is represented by 100%, while the lower band is 0%. If it is above 100%, the current price is above the upper band; if it is below 0%, the price is below the lower band.


4.3. VWMA

The Volume Weighted Moving Average is a simple average weighted by the volume. It may be useful to follow the money.


4.4. Summation/Subtraction/Multiplication/Division of two series (+)

This option is useful when you want to set a custom indicator by using math on two already defined indicators. Say in the index 0 you defined a Moving Average and in the index 1 you defined a VWMA. You could create a Summation of two series and add the value both indicators and work with it. You can use it, for example, to define a take profit/stop loss level by dividing the Summation by 2 in the tp/sl section, where you would get the midpoint of the MA and the VWMA, extensively adding options to your strategy. Use your creativity! (BUT ALWAYS REMEMBER TO CHECK IF THE DEFINED TP/SL IS ABOVE/BELOW THE ENTRY LEVEL IN THE POSITIONS OPENING CONDITIONS SECTION).


You can also add a certain indicator to a price series. The following price series codes are available:


    • 101 - corresponds to PRICE_OPEN;
    • 102 - corresponds to PRICE_HIGH;
    • 103 - corresponds to PRICE_LOW;
    • 104 - corresponds to PRICE_CLOSE;
    • 105 - corresponds to CANDLE_AMPLITUDE (difference between high-low of a bar)
    • 106 - corresponds to CANDLE_OPENCLOSE_AMPLITUDE (absolute difference between close-open of a bar)
    • 107 - corresponds to TICK_VOLUME;
    • 108 - corresponds to REAL_VOLUME;
    • any value between 0 to 9 - corresponds to the indicator in the respective index.


4.5. Custom indicators

You can use custom indicators in this EA; the possibilities are infinite. However, remember the first parameter is ALWAYS the number of buffer the indicator has. This is necessary to retrieve its data. If this value is not set or is wrong, you may receive an Array out of range or another undefined error.
















Files:
Share it with friends: