Spécifications
//@version=5
strategy("Operator Psychology Trading Strategy with Heikin-Ashi (Auto Risk-Reward)", overlay=true, pyramiding=2, default_qty_type=strategy.fixed, default_qty_value=1)
// Check for the 3-minute timeframe
if (not (timeframe.isintraday and timeframe.period == "3"))
runtime.error("This strategy can only be run on the 3-minute timeframe.")
// Parameters for ATR, Stop-Loss, Risk Percentage, and Sideways Market Threshold
atrLength = input.int(3, title="ATR Length") // ATR length set to 3
riskMultiplier = input.float(3, title="Risk Multiplier for Stop-Loss") // Updated Risk Multiplier to 3
capitalRiskPercent = input.float(2, title="Capital Risk Percentage per Trade", minval=0.1, maxval=100) // Capital Risk set to 2%
sidewaysThreshold = input.float(1.6, title="Sideways ATR Threshold", minval=0.1) // Updated Sideways ATR Threshold to 1.6
// Moving Average for Trend Detection
maLength = input.int(6, title="Moving Average Length") // Updated Moving Average length to 6
ma = ta.sma(close, maLength)
// Heikin-Ashi Candle Calculation
haClose = (open + high + low + close) / 4
var haOpen = (open + close) / 2
haOpen := na(haOpen[1]) ? (open + close) / 2 : (haOpen[1] + haClose[1]) / 2
haHigh = math.max(high, math.max(haOpen, haClose))
haLow = math.min(low, math.min(haOpen, haClose))
// Calculate ATR based on Heikin-Ashi candles
atrValue = ta.atr(atrLength)
// Define the previous and current Heikin-Ashi candle values
prevHaClose = haClose[1]
prevHaHigh = haHigh[1]
prevHaLow = haLow[1]
prevHaOpen = haOpen[1]
currHaClose = haClose
currHaHigh = haHigh
currHaLow = haLow
currHaOpen = haOpen
// Calculate buy and sell volumes using Heikin-Ashi candles
prevBuyVolume = prevHaClose > prevHaOpen ? volume : 0
currBuyVolume = currHaClose > currHaOpen ? volume : 0
prevSellVolume = prevHaClose < prevHaOpen ? volume : 0
currSellVolume = currHaClose < currHaOpen ? volume : 0
// Sideways Market Condition: Check if ATR is below threshold (low volatility)
sidewaysMarket = atrValue < sidewaysThreshold
// Define Buy Signal conditions based on operator psychology using Heikin-Ashi candles and trend confirmation
buyCondition1 = currHaClose > prevHaHigh // Heikin-Ashi close breaks previous Heikin-Ashi high
buyCondition2 = currBuyVolume > prevBuyVolume // Current buying volume exceeds previous
buyCondition3 = prevHaClose < currHaOpen // Previous Heikin-Ashi candle closes lower than current open
buyCondition4 = haClose > ma // Close price is above moving average (trend confirmation)
buySignal = buyCondition1 and buyCondition2 and buyCondition3 and buyCondition4 and not sidewaysMarket // Avoid sideways zones
// Define Sell Signal conditions based on operator psychology using Heikin-Ashi candles and trend confirmation
sellCondition1 = currHaClose < prevHaLow // Heikin-Ashi close breaks previous Heikin-Ashi low
sellCondition2 = currSellVolume > prevSellVolume // Current selling volume exceeds previous
sellCondition3 = prevHaClose > currHaOpen // Previous Heikin-Ashi candle closes higher than current open
sellCondition4 = haClose < ma // Close price is below moving average (trend confirmation)
sellSignal = sellCondition1 and sellCondition2 and sellCondition3 and sellCondition4 and not sidewaysMarket // Avoid sideways zones
// Calculate Stop-Loss and Target Levels for Long and Short Positions
longStopLoss = currHaClose - (atrValue * riskMultiplier) // Stop-loss for long position
shortStopLoss = currHaClose + (atrValue * riskMultiplier) // Stop-loss for short position
// **Auto Risk-Reward Ratio**: The Reward (Target) is dynamically calculated based on the risk
rewardRatio = input.float(6, title="Default Risk-Reward Ratio") // Updated Risk-Reward Ratio to 6
longTarget = currHaClose + (currHaClose - longStopLoss) * rewardRatio // Target for long position
shortTarget = currHaClose - (shortStopLoss - currHaClose) * rewardRatio // Target for short position
// Calculate position size based on capital risk and set to auto trade 0.01 lot for XAUUSD
capital = strategy.equity
riskPerTrade = capitalRiskPercent / 100 * capital
longPositionSize = math.max(riskPerTrade / (currHaClose - longStopLoss), 0.01) // Minimum 0.01 lot for long position
shortPositionSize = math.max(riskPerTrade / (shortStopLoss - currHaClose), 0.01) // Minimum 0.01 lot for short position
// Strategy Execution: Long Trades
if (buySignal)
strategy.entry("Long", strategy.long, qty=longPositionSize)
strategy.exit("Take Profit", "Long", limit=longTarget, stop=longStopLoss)
// Strategy Execution: Short Trades
if (sellSignal)
strategy.entry("Short", strategy.short, qty=shortPositionSize)
strategy.exit("Take Profit", "Short", limit=shortTarget, stop=shortStopLoss)
// Plot shapes for buy and sell signals
plotshape(series=buySignal, title="Buy Signal", location=location.belowbar, color=color.blue, style=shape.labelup, text="LONG")
plotshape(series=sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SHORT")
// Alert conditions for buy and sell signals
alertcondition(buySignal, title="Buy Alert", message="Buy Signal Triggered!")
alertcondition(sellSignal, title="Sell Alert", message="Sell Signal Triggered!")
// Plot the Heikin-Ashi Close price for reference
plot(haClose, color=color.gray, linewidth=1, title="Heikin-Ashi Close")
// Plot moving average for trend reference
plot(ma, color=color.orange, linewidth=1, title="Moving Average (Trend Filter)")
Répondu
1
Évaluation
Projets
178
39%
Arbitrage
4
25%
/
50%
En retard
14
8%
Gratuit
2
Évaluation
Projets
34
24%
Arbitrage
4
0%
/
50%
En retard
2
6%
Travail
3
Évaluation
Projets
5
0%
Arbitrage
5
0%
/
40%
En retard
0
Gratuit
4
Évaluation
Projets
618
33%
Arbitrage
35
37%
/
49%
En retard
10
2%
Occupé
5
Évaluation
Projets
44
61%
Arbitrage
0
En retard
0
Gratuit
6
Évaluation
Projets
240
73%
Arbitrage
7
100%
/
0%
En retard
1
0%
Gratuit
7
Évaluation
Projets
37
24%
Arbitrage
14
0%
/
93%
En retard
4
11%
Gratuit
8
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
9
Évaluation
Projets
88
42%
Arbitrage
4
0%
/
100%
En retard
3
3%
Travail
10
Évaluation
Projets
1445
72%
Arbitrage
119
29%
/
47%
En retard
355
25%
Travail
Publié : 3 articles
11
Évaluation
Projets
146
34%
Arbitrage
13
8%
/
62%
En retard
26
18%
Gratuit
Publié : 6 codes
Commandes similaires
Ninjatrader indicator
30+ USD
I have an issue with my ninja script and i would like you to help me straighten things I wanted to create an indicator and i have the source code already but i am getting compiling errors on my NinjaTrader And i tried fixing the error it still same I sent 3 images here for you to understand the errors and i would like to ask if you can help me fix it so i can go ahead and compile my source code. Thanks
Nijatrader indicator
30+ USD
Good day, I would like to build an automated trading system for Ninjatrader using 2 MACD, a Supertrend, and a moving average indicator. I want the option to adjust the indicator settings, the ability to trade at three different times, and the option to receive alerts. I want to get an idea of what that will cost me. It will enter trades on all blue take one contract out at a fixed point, move the stop to break even
"Hello! I am an experienced programmer specializing in automated trading software for MetaTrader 4 (MQL4) and MetaTrader 5 (MQL5). My goal is to help traders turn their manual strategies into fully automated robots (Expert Advisors) and custom indicators. My services include: Developing Expert Advisors (EA) from scratch based on your strategy. Creating Custom Indicators and Scripts. Modifying existing EAs (adding
I have a simple strategy that need coding on tradingview Strategy using high low at seleted time and when breakout to entry buy sell. Everything will be explained on private
Enhance current EA
200+ USD
I am looking for an experienced MQL5 developer to modify and enhance my existing Expert Advisor, "Gold Levels Trader". The current version has a low win rate (~30%) and issues with ATR-based Stop Loss execution. I want to replace the current "pips drop/rise" logic with Fibonacci Retracement levels for entry signals, implement a Daily Drawdown Limit , and add Pending Orders functionality
I want developer who know how to create bot which immediately transfer specific crypto coin deposit to one crypto address to another specific address in just a second,, if you know about this then only comment on this post
So the things we need in algorithm of mql5 language EA in mt5 1. Depending on timeframe it can recognise the previous swing high and low 2. Timeframe is 5m,15m,1h,4h 3. It can recognise the basic Market bias that is market is bullish or bearish we can identify using (ema,rsi,basic smc bias,ict bias structure mapping) or use anything to find bias structure 4. EA should have option to change timeframe and change risk
require the development of a high-speed, fully automated trading Expert Advisor (EA) for MetaTrader 5 , optimized for live trading on both Deriv and Exness . The EA must be designed for fast execution, low latency, and reliability on real-money accounts , with full compatibility across broker-specific contract specifications, tick sizes, tick values, pricing formats, and volume rules. It should automatically detect
# Copyright 2025, MetaQuotes Ltd. # https://www.mql5.com import importlib . util mt5_spec = importlib . util . find_spec ( "MetaTrader5" ) if mt5_spec is None : mt5 = None else : import MetaTrader5 as mt5 # pyright: ignore[reportMissingImports] def main (): if mt5 is None : print ( "MetaTrader5 module not available" ) return print ( 'Python executable:' , __import__ ( 'sys' ).executable) ok = mt5
Expert Advisor – Automated Forex Trading System (MT5)
500 - 3000 USD
Scope of Work Develop 15 individual Expert Advisors (MT4 and/or MT5) Each EA will have: Unique trade logic and execution rules Configurable inputs (risk %, lot size, TP/SL, filters, sessions, etc.) Clean, modular, well-commented code Error-free compilation Backtest-ready functionality Core Features (Across EAs) Market & pending order execution Risk-based position sizing Time/session filters Trade limits (per day /
Informations sur le projet
Budget
100 - 200 USD
Délais
de 1 à 100 jour(s)