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
Hi! I have a general strategy concept, but I would like you to help develop and define the exact trading rules. The planned strategy is: * Instrument: MNQ futures * Platform: NinjaTrader 8 * M30 timeframe for identifying the main trend * M5 timeframe for trade entries * RSI and MACD indicators * Support and resistance levels * Fully automated entries and exits * Automatic Stop Loss, Take Profit and Trailing Stop *
Okay, this is a big one for MT5 traders. Let's do it properly. In Python, the "Merge Tool" usually means 2 things: 1. *Merge MT5 data from different symbols / timeframes into one DataFrame* 2. *Plot it as a clean graph* Here is a complete working setup: *Step 1: Install* pip install MetaTrader5 pandas matplotlib mplfinance *Step 2: Full Code - Get MT5 Data + Merge + Plot* import MetaTrader5 as mt5 import pandas as pd
Experienced Trading Software Developer Needed – Multi-Platform Development Hello! I'm looking for an experienced developer to create a custom trading indicator and convert it into an automated trading bot for the following platforms: MT5 NinjaTrader 8 Quantower cTrader The plan is to develop the same indicator and trading bot for all four platforms, one after another. Project requirements: Custom trading indicator
Hi! I need an experience developer with order flow, volume delta, and futures scalping, and I wanted to ask you a few questions. Have you personally developed and tested fast-paced strategies for Gold Futures (GC), particularly those that enter during short-term price impulses and scale into positions as momentum builds? From your experience, what indicators or signals help you determine whether an impulse has enough
a trading bot that can open and close trade by its self a stop loss of 1.2 lot size and good tp it should be able to learn trends and learn from its mistakes
Was wondering if it’s possible for you to recreate a trading indicator that I currently use, as it’s a private script. I just need to make sure I have the complete source code and can use my own version independently. I can provide screenshots of its settings and chart signals, along with examples of how it behaves. Would this be something you’d be able to develop
Title: Create a Combined Indicator from 3 EX4 Indicators + Fully Automatic Trading EA (MT4) Description: Hello, I need an experienced MQL4 developer to build a custom trading system based on 3 existing .ex4 indicators. Project Requirements: Combined Custom Indicator: Read and merge signals from 3 specified .ex4 indicators via buffer reading (iCustom). Generate a consolidated BUY or SELL arrow/signal
Brush And Symetry Rectangle Double ANd Alert And Label Create All Tools Need For Tecnical Analays ON CHart Nds Stratigy... Is Good Indicator Tools For Analays I will Use this Indicator So Cute
//+------------------------------------------------------------------+ //| Durban Gold Hunter.mq5 (v3.00) | //| Multi-pair EA for MetaTrader 5 (Razor Markets, XM). | //| Strategy modules (each can be switched on/off): | //| 1. EMA crossover | //| 2. 714 method (EMA 7 + RSI 14) | //| 3. CRT (Candle Range Theory: range sweep and close back inside)| //| 4. Trend line breakout (auto-drawn from swing highs/lows) | //| 5
Hello, I am an independent developer selling an Expert Advisor (EA) on the MQL5 Market. I am looking for an experienced Forex affiliate marketing company or professional marketer to promote my existing MT5 trading robot to customers worldwide. My proposed partnership offers a 35% commission per verified sale, with the possibility of a long-term collaboration. I would like to know: Do you promote third-party MT5