Specifiche

# Import necessary libraries
import pandas as pd

# Define parameters
stop_loss_percentage = 0.02  # Set stop loss percentage (2% in this example)
take_profit_percentage = 0.05  # Set take profit percentage (5% in this example)

# Read historical price data
df = pd.read_csv("historical_data.csv")  # Replace with your historical data file or API integration

# Calculate moving averages
df['SMA_50'] = df['Close'].rolling(window=50).mean()
df['SMA_200'] = df['Close'].rolling(window=200).mean()

# Initialize variables
position = None
entry_price = 0.0

# Start trading loop
for i in range(200, len(df)):
    current_price = df['Close'].iloc[i]

    # Check for entry conditions
    if position is None and df['SMA_50'].iloc[i] > df['SMA_200'].iloc[i]:
        position = 'long'
        entry_price = current_price
        print(f"Enter long position at {entry_price}")

    elif position is None and df['SMA_50'].iloc[i] < df['SMA_200'].iloc[i]:
        position = 'short'
        entry_price = current_price
        print(f"Enter short position at {entry_price}")

    # Check for exit conditions
    if position == 'long' and current_price >= (1 + take_profit_percentage) * entry_price:
        position = None
        exit_price = current_price
        print(f"Exit long position at {exit_price}")
        profit = exit_price - entry_price
        print(f"Profit: {profit}")

    elif position == 'long' and current_price <= (1 - stop_loss_percentage) * entry_price:
        position = None
        exit_price = current_price
        print(f"Exit long position at {exit_price}")
        loss = exit_price - entry_price
        print(f"Loss: {loss}")

    elif position == 'short' and current_price <= (1 - take_profit_percentage) * entry_price:
        position = None
        exit_price = current_price
        print(f"Exit short position at {exit_price}")
        profit = entry_price - exit_price
        print(f"Profit: {profit}")

    elif position == 'short' and current_price >= (1 + stop_loss_percentage) * entry_price:
        position = None
        exit_price = current_price
        print(f"Exit short position at {exit_price}")
        loss = entry_price - exit_price
        print(f"Loss: {loss}")

Con risposta

1
Sviluppatore 1
Valutazioni
(2)
Progetti
2
0%
Arbitraggio
1
0% / 0%
In ritardo
2
100%
Gratuito
2
Sviluppatore 2
Valutazioni
(43)
Progetti
66
12%
Arbitraggio
12
58% / 42%
In ritardo
1
2%
Gratuito
3
Sviluppatore 3
Valutazioni
(35)
Progetti
50
42%
Arbitraggio
3
33% / 33%
In ritardo
4
8%
Gratuito
4
Sviluppatore 4
Valutazioni
(6)
Progetti
10
50%
Arbitraggio
6
17% / 50%
In ritardo
3
30%
In elaborazione
5
Sviluppatore 5
Valutazioni
(5)
Progetti
4
50%
Arbitraggio
4
0% / 75%
In ritardo
0
Gratuito
Ordini simili
I am looking for an experienced MQL5 developer to build a professional Expert Advisor with the following specs: TECHNICAL REQUIREMENTS: - Platform: MetaTrader 5 (MT5) - Pairs: GBPUSD and EURUSD - Broker suffix support (e.g. GBPUSD@, EURUSD@) - Primary timeframe: M5 -Higher timeframe bias: H1 and H4 (for trend direction only) - One chart setup — manages both pairs from one chart STRATEGY: - Price action based: BOS
OBJETIVO Criar um Expert Advisor MT5 profissional para XAUUSD focado em: Consistência Baixo drawdown Scalping profissional Proteção da conta Crescimento sustentável Compatibilidade com conta micro e prop firms NÃO utilizar: Martingale Grid Hedge agressivo Recovery system Multiplicação de lotes após perda --- ATIVO XAUUSD apenas --- TIMEFRAMES Timeframe principal M5 Confirmação tendência M15 Confirmação macro opcional
I need a very advanced and intelligent MT5 Expert Advisor coded in MQL5 for XAUUSD, based on ICT + CRT + Smart Money Concepts. The goal is not a simple robot, but a professional decision-making system with strong filters, risk control, and high-quality trade selection. The EA must include: 1. Multi-Timeframe Analysis - D1 / H4 / H1 bias - M15 / M5 entry confirmation - Bullish or bearish market structure - BOS, CHoCH
Intraday Trade Ninja EA — Complete Logic Structure This document maps the full architecture, execution logic, signal flow, trade management, and safety structure of the Intraday Trade Ninja MT4 Expert Advisor. 1. Core Indicators · ©Price Border (TMA bands) · MA-X Arrows · MA-Y Arrows · LeManSignal · EMA 49 & 89 - Per Candle Color Switching 2. EA Entry Architecture ·
Hi Developers, I am looking for an experienced MT4/MT5 EA developer to create an Expert Advisor based on my custom indicator along with a Trend Magic confirmation filter. I will provide: Raw Pine Script of my custom indicator Pine Script of Trend Magic indicator Important Note: My existing indicator requires slight correction/refinement because it occasionally fails to identify the required candle accurately
I have a 90% completed project with the execution part left to complete, I have been struggling to complete this section and I need help from someone expert in MQL5 with knowledge on forex trading and ICT Concepts coding. Contact me for further details
Hi basically I'm wanting an already made EA scalper that's constantly in and out of trades on the M1 time frame that has good risk management. It knows what it's doing. Most of its trades are profitable and that can start with £100. I am willing to pay up to £1000 for the right scalping bot. If you please have one and you're very confident in it, please allow me to use a live version to see how it does and if I'm
Auto trading system on mobile with high probability win rate. Trades and auto trading system that works well on gold and forex, most important risk reward ratio. It must be 1:3 or more then that whenever possible
Auto trading system with hi probability win rate. Trades and auto trading system works well on gold and forex most important risk reward ratio. It must be 1:3 or more then that
Hello, i would like to have a ninjatrader indicator. I wanna to have a footprint indicator with delta, imbalances and big trades identifiable. Also I wanna sell it on whop. And it should be fully customisable in NT8

Informazioni sul progetto

Budget
30+ USD
Scadenze
da 1 a 2 giorno(i)