1. Introduction
Sapphire Strat Maker and Sapphire Strat Maker Alt (Free) are Experts Advisors designed so the users can have an easy way to develop trading strategies. By combining the ready-made available indicators, or using custom indicators defined by the user, it is possible to create an infinite number of strategies with no knowledge in coding.
Here I present to you some introductory details about the strategy creation on both EA (the same principle).
For more information, check the other posts and the documentation:
- Documentation - General information
- Documentation - ENUMs information
- Documentation - Indicators
- Documentation - Indicators buffers
2. How does it work?
The bot evaluates each condition at the very first tick of a new candle. When a new tick is received and a bar starts to form, this candle is indexed as 0. Every other candle is then indexed in numerical order from then. Consider this as how candles are enumerated:
You can see that candle 0 is starting to be formed. Taking this into account, usually we want to get data from at least the candle 1 - but nothing stops the user from getting the data from candle 0; just note that all open, high, low and close will be the same.
With this you can specify rules and create the strategies as you want.
A simple moving average crossover would be defined like this:
Open buy position - [fast ma from bar 1] > [slow ma from bar 1] and [fast ma from bar 2] < [slow ma from bar 2]. If the fast ma on bar 1 is higher than the slow ma on bar 1, but it was below on bar 2, it means it crossed over the slow moving average, which is a signal for a long position.
You can do this and set take profit and stop loss levels, stop trading after reaching some profit/loss, set a breakeven condition, and improve your strategy with money management conditions.
Currently, there're these options to compare:
- Crossing upwards/downwards: this method checks if the series defined in X.1 is crossing upwards/downwards the series defined in X.2. A crossing upwards happens when the bar 1 of the series in X.1 is above the bar 1 of the series defined in X.2 and the bar 2 of the series X.1 is below the bar 2 of the series defined in X.2. Check the documentation for more info.
- Upwards/downwards: checks if the series defined in X.1 are going up or down. In this case, series defined in X.2 are ignored. A series is going upwards if the bar 1 is above bar 2; it is going downwards if the bar 1 is below bar 2. Check the documentation for more info.
- Reversal up/down: checks if the series were going up and reversed down or the inverse. A series is reversing up when the bar 2 was below the bar 3, but the bar 1 is above bar 2; it is reversing down when bar 2 was above the bar 3, but the bar 1 is below bar 2. Check the documentation for more info.
- > (greater), < (lower), >= (greater/equal), <= (lower/equal), == (equal), != (diff): these are all self-explanatory. If X.1 compares true against X.2, it may result in a buy signal. These provide high flexibility to create signals.
Here is an example of Crossing downwards:
Here we check if the indicator at index 0 is crossing downwards indicator at index 1.
Check the next blog posts to get more info about the process of optimizing/creating strategies.
3. Documentation
Documentation - General information
Documentation - Indicators information
Documentation - ENUMs information
4. Conclusion
If you have any question, do not hesitate to reaching out to me.