The MESA Adaptive Moving Average ( MAMA ) adapts to price movement in an entirely new and unique way. The adaptation is based on the rate change of phase as measured by the Hilbert Transform Discriminator. The advantage of this method of adaptation is that it features a fast attack average and a slow decay average so that composite average rapidly ratchets behind price changes and holds the average value until the next ratchet occurs.
An interesting set of indicators result if the MAMA is applied to the first MAMA line to produce a Following Adaptive Moving Average (FAMA). By using an alpha in FAMA that is half the value of the alpha in MAMA , the FAMA has steps in time synchronization with MAMA , but the vertical movement is not as great. As a result, MAMA and FAMA do not cross unless there has been a major change in market direction. This suggests an adaptive moving average crossover system that is virtually free of whipsaw trades.
For our purposes here, FAMA acts as a lagged signal line. We are tracking MAMA crosses over/under FAMA. The white line is FAMA, the green/red/white line is MAMA .
You can read more here: https://www.mesasoftware.com/papers/MAMA.pdf
Volatility Types
v1.0 Included Volatility
Average True Range (ATR)
True Range Double ( TRD )
Take profit philosophy
The Take Profits and Stop Loss are based on multiples of volatility . So, if you set Take Profit 1 to a multiple of 1, which is the default, then the the Take Profit 1 for a Long is:
source + multiplier x volatility in price or source + 1.0 x volatility in price
If you set the Stoploss to a multiplier of 1.5, then the Stoploss for a Long is set to:
source - multiplier x volatility in price or source - 1.5 x volatility in price
Trading Rules
Post MAMA Cross Qualifier (PBCQ): If MAMA crosses FAMA but the trade is invalid due to additional qualifiers, then the strategy doesn't enter a trade on that candle. This setting allows you override this disqualification in the following manner: If MAMA crosses XX bars ago and is now qualified by other qualifiers, then the strategy enters a trade.
Volatility: If MAMA crosses FAMA, we check to see how far it has moved in terms of multiples of volatility denoted in price (ATR x multiple). If MAMA has moved by at least "Qualifier multiplier" and less than "Range Multiplier", then the strategy enters a trade. This range is shown on the chart with yellow area that tracks price above/blow the FAMA. Also, see the dots at the top of the chart. If the dots are green, then price passes the volatility test for a long. If the dots are red, then price passes the volatility test for a short. When MAMA line turns white, it means that the volatility is too low to trader either direction.
Take Profit/Stoploss Quantity Removed
1 Take Profit: 100% of the trade is closed when the profit target or stoploss is reached.
2 Take Profits: Quantity is split 50/50 between Take Profit 1 and Take Profit 2
3 Take Profits: Quantify is split 50/25/25.
Example: If you select 3 Take Profits and you purchase 1 BTC , then when Take Profit 1 hits, the strategy will remove 50% of the trade, meaning you'll have 0.5 BTC left in the trade. When Take Profit 2 hits, the strategy will remove 50% of 0.5 BTC leaving 0.25 BTC in the trade. When Take Profit 3 hits, then whatever is left in the trade is removed from the trade.
Moving Stoploss
1 Take Profit: The Stoploss doesn't move
2 Take Profits: After Take Profit 1 is hit, then the Stoploss moves to the trade Entry
3 Take Profits: After Take Profit 1 is hit, then the Stoploss for Take Profit 2 and Take Profit 3 is move to trade Entry. When Take Profit 2 is hit, then Take Profit 3 Stoploss is moved to Take Profit 1
Date Range
Select starting (from) date for the backtest and ending (through) date for the backtest.
Other things to know
The strategy does't exit on the entry candle. This is a safety measure to keep the backtest results clean and accurate. After the strategy enters a trade, it will wait until candle close to set take profits and stoploss. This should have minimal effects on the backtest results compared to live trading. This may or may not be updated in the future
Included
Volatility channels w/three levels
Loxx's Expanded Source Types
Additional moving averages, volatility types, qualifiers, and other advanced features will be added in future releases. In addition, future releases may contain different signal/trigger combinations.
An interesting set of indicators result if the MAMA is applied to the first MAMA line to produce a Following Adaptive Moving Average (FAMA). By using an alpha in FAMA that is half the value of the alpha in MAMA , the FAMA has steps in time synchronization with MAMA , but the vertical movement is not as great. As a result, MAMA and FAMA do not cross unless there has been a major change in market direction. This suggests an adaptive moving average crossover system that is virtually free of whipsaw trades.
For our purposes here, FAMA acts as a lagged signal line. We are tracking MAMA crosses over/under FAMA. The white line is FAMA, the green/red/white line is MAMA .
You can read more here: https://www.mesasoftware.com/papers/MAMA.pdf
Volatility Types
v1.0 Included Volatility
Average True Range (ATR)
True Range Double ( TRD )
Take profit philosophy
The Take Profits and Stop Loss are based on multiples of volatility . So, if you set Take Profit 1 to a multiple of 1, which is the default, then the the Take Profit 1 for a Long is:
source + multiplier x volatility in price or source + 1.0 x volatility in price
If you set the Stoploss to a multiplier of 1.5, then the Stoploss for a Long is set to:
source - multiplier x volatility in price or source - 1.5 x volatility in price
Trading Rules
Post MAMA Cross Qualifier (PBCQ): If MAMA crosses FAMA but the trade is invalid due to additional qualifiers, then the strategy doesn't enter a trade on that candle. This setting allows you override this disqualification in the following manner: If MAMA crosses XX bars ago and is now qualified by other qualifiers, then the strategy enters a trade.
Volatility: If MAMA crosses FAMA, we check to see how far it has moved in terms of multiples of volatility denoted in price (ATR x multiple). If MAMA has moved by at least "Qualifier multiplier" and less than "Range Multiplier", then the strategy enters a trade. This range is shown on the chart with yellow area that tracks price above/blow the FAMA. Also, see the dots at the top of the chart. If the dots are green, then price passes the volatility test for a long. If the dots are red, then price passes the volatility test for a short. When MAMA line turns white, it means that the volatility is too low to trader either direction.
Take Profit/Stoploss Quantity Removed
1 Take Profit: 100% of the trade is closed when the profit target or stoploss is reached.
2 Take Profits: Quantity is split 50/50 between Take Profit 1 and Take Profit 2
3 Take Profits: Quantify is split 50/25/25.
Example: If you select 3 Take Profits and you purchase 1 BTC , then when Take Profit 1 hits, the strategy will remove 50% of the trade, meaning you'll have 0.5 BTC left in the trade. When Take Profit 2 hits, the strategy will remove 50% of 0.5 BTC leaving 0.25 BTC in the trade. When Take Profit 3 hits, then whatever is left in the trade is removed from the trade.
Moving Stoploss
1 Take Profit: The Stoploss doesn't move
2 Take Profits: After Take Profit 1 is hit, then the Stoploss moves to the trade Entry
3 Take Profits: After Take Profit 1 is hit, then the Stoploss for Take Profit 2 and Take Profit 3 is move to trade Entry. When Take Profit 2 is hit, then Take Profit 3 Stoploss is moved to Take Profit 1
Date Range
Select starting (from) date for the backtest and ending (through) date for the backtest.
Other things to know
The strategy does't exit on the entry candle. This is a safety measure to keep the backtest results clean and accurate. After the strategy enters a trade, it will wait until candle close to set take profits and stoploss. This should have minimal effects on the backtest results compared to live trading. This may or may not be updated in the future
Included
Volatility channels w/three levels
Loxx's Expanded Source Types
Additional moving averages, volatility types, qualifiers, and other advanced features will be added in future releases. In addition, future releases may contain different signal/trigger combinations.
Informacje o Wersji:
Trimmed down inputs to speed up load time.
Public Telegram Group, t.me/algxtrading_public
VIP Membership Info: www.patreon.com/algxtrading/membership
VIP Membership Info: www.patreon.com/algxtrading/membership