indicator('Slope Adaptive Moving Average (MZ SAMA)', shorttitle='MZ SAMA', overlay=true)
chartResolution = input.timeframe('', title='Chart Resolution')
src = input.source(close, 'Source')
string grp_1 = 'SAMA Length Inputs'
length = input(200, title='Adaptive MA Length', group = grp_1)
majLength = input(14, title='Major Length', group = grp_1)
minLength = input(6, title='Minor Length', group = grp_1)
string grp_2 = 'Slope and Dynamic Coloring Parameters'
slopePeriod = input.int(34, title='Slope Period', group = grp_2)
slopeInRange = input.int(25, title='Slope Initial Range', group = grp_2)
flat = input.int(17, title='Consolidation area is when slope below:', group = grp_2)
bull_col = input.color(color.green, 'Bull Color ', inline='dyn_col', group = grp_2)
bear_col = input.color(color.red, 'Bear Color ', inline='dyn_col', group = grp_2)
conc_col = input.color(color.yellow, 'Reversal/Consolidation/Choppiness Color ', inline='dyn_col', group = grp_2)
showSignals = input.bool(true, title='Show Signals on Chart', group='Plot Parameters')
calcslope(_ma, src, slope_period, range_1) =>
pi = math.atan(1) * 4
highestHigh = ta.highest(slope_period)
lowestLow = ta.lowest(slope_period)
slope_range = range_1 / (highestHigh - lowestLow) * lowestLow
dt = (_ma[2] - _ma) / src * slope_range
c = math.sqrt(1 + dt * dt)
xAngle = math.round(180 * math.acos(1 / c) / pi)
maAngle = dt > 0 ? -xAngle : xAngle
maAngle
dynColor(_flat, slp, col_1, col_2, col_r) =>
var col = color.new(na,0)
col := slp > _flat ? col_1:
slp <= -_flat ? col_2:
slp <= _flat and slp > -_flat ? col_r : col_r
col
ama(src,length,minLength,majLength)=>
minAlpha = 2 / (minLength + 1)
majAlpha = 2 / (majLength + 1)
hh = ta.highest(length + 1)
ll = ta.lowest(length + 1)
mult = hh - ll != 0 ? math.abs(2 * src - ll - hh) / (hh - ll) : 0
final = mult * (minAlpha - majAlpha) + majAlpha
final_alpha = math.pow(final, 2)
var _ama = float(na)
_ama := (src - nz(_ama[1])) * final_alpha + nz(_ama[1])
_ama
sama = request.security(syminfo.tickerid, chartResolution, ama(src,length,minLength,majLength))
slope = calcslope(sama, src, slopePeriod, slopeInRange)
sama_col = request.security(syminfo.tickerid, chartResolution, dynColor(flat, slope, bull_col, bear_col, conc_col))
plot(sama, 'MZ SAMA', sama_col, 4)
_up = sama_col == bull_col
_downn = sama_col == bear_col
_chop = sama_col == conc_col
buy = _up and not _up[1]
sell = _downn and not _downn[1]
chop_zone = _chop and not _chop[1]
_signal() =>
var sig = 0
if buy and sig <= 0
sig := 1
if sell and sig >= 0
sig := -1
sig
sig = _signal()
longsignal = sig == 1 and (sig != 1)[1]
shortsignal = sig == -1 and (sig != -1)[1]
atrOver = 1 * ta.atr(5)
plotshape(showSignals and longsignal ? (sama - atrOver) : na , style=shape.triangleup, color=color.new(color.green, 30), location=location.absolute, text='Buy', size=size.small)
plotshape(showSignals and shortsignal ? (sama + atrOver): na , style=shape.triangledown, color=color.new(color.red, 30), location=location.absolute, text='Sell', size=size.small)
alertcondition(longsignal, "Buy", "Go Long" )
alertcondition(shortsignal, "Sell", "Go Short")
alertcondition(chop_zone, "Chop Zone", "Possible Reversal/Consolidation/Choppiness")
if longsignal
alert("Buy at" + str.tostring(close), alert.freq_once_per_bar_close)
if shortsignal
alert("Sell at" + str.tostring(close), alert.freq_once_per_bar_close)
Ähnliche Aufträge
The objective is to develop a custom technical indicator for MetaTrader 5 (MQL5) that replicates the exact visual structure, inputs, and features of the "AYN-Indicator by Snurk" as shown in the provided screenshot. The indicator must analyze price actions based on a flexible lookback period, plot dynamic trend filters, and render precise Buy/Sell breakout labels without any lagging or repainting
Requirements Specification: Debug & Error Fixing: Review the entire source code of the MQL expert advisor. Identify and fix all logical errors, bugs, and performance issues that cause trades to close prematurely or yield extremely low profits. Strategy Restructuring & Optimization: Fully analyze and optimize the current entry and exit strategy for USDJPY and GBPUSD. Modify, upgrade, or completely rewrite the entry
I am looking for an MQL5 developer to independently review an existing EA’s execution and position management logic. The review should focus on duplicate orders, trade isolation by symbol and magic number, broker price and volume constraints, error handling, and recovery after a terminal restart. This order is for an audit report. Please do not modify the source or change the trading strategy. For each finding
Title: Fully Automatic MT5 Trading Bot (Expert Advisor) with Risk Management I want a fully automated trading robot (Expert Advisor) for MetaTrader 5, written in MQL5. The bot must automatically analyse market data, identify trading opportunities, execute BUY and SELL orders, manage open positions, and close trades according to predefined rules without requiring manual confirmation for each trade. Requirements
Subject: Inquiry: MQL4 Optimization & Refinement for Proprietary Binary Suite (Pine-to-MT4) I am seeking an experienced MQL4 / MetaTrader developer to optimize and finalize a custom binary options trading suite. Project Summary Core Architecture: Multi-pair Regime Scanner (22-pair FX basket monitoring state/score) and a Signal Engine operating on M1 charts. Strategy Sequence: Pre-Alert Dot: Placed on a candle closing
Hello I want some that can help with my strategy signal I have the video that you are going to watch if you know you can help me with kindly do well to bid and let discussed it an urgent project and also if you can not work before you get paid please don bid thanks
Existing EA: NEW_CORE_ORB_M5_v021 | MT5 | XAUUSD M5 Early-stage research prototype, not a new EA from scratch. Need an experienced MQL5 developer to audit, complete, repair, improve and test BOTH independent strategies equally: Opening Range Breakout (ORB) and Scalp. Keep code lightweight and preserve an untouched baseline. No unnecessary rewrite or complex filters. 1. ORB Strategy Verify opening-range construction
i need an expert to develop Bot TO trade using MT5 with a profitable strategy ... work daily with good indicators the price will be negotiable will try the bot first after we can decide
The indicator should identify the high and low of two configurable trading sessions, draw their levels on the chart, and generate reliable breakout alerts. 1. Session Settings Symbol: Current chart symbol (EURUSD for testing). Timeframe: M5. Two independent sessions: Session A: 08:00–10:00 Session B: 13:00–15:00 All times use MT5 broker server time. Start and end times must be configurable. The indicator should
Project: Convert TradingView Indicator to MT4 We are looking for an experienced MQL4 developer to convert a high-quality TradingView indicator into a MetaTrader 4 (MT4) indicator. Indicator Details: The TradingView indicator generates buy and sell arrows for trade entries. It is non-repainting, has no lag, and is highly reliable. Arrows appear only after the candle closes and remain visible permanently. Requirements