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
65
11%
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 need a highly disciplined, low-risk EA for MT4/MT5 that trades only when 100% strategy conditions are met. It must include multi-timeframe trend logic, support/resistance rejection, BOS/CHoCH detection from real swing levels, and a breakout strategy with trailing SL. EA should scan all major pairs (from one chart), trade only during 07:00–16:00 GMT, and skip trades 2 hours before major news. Max 1 trade per pair
to compile all the suitable markets for buy and place a buy for the shortest timeframe and place a sell for also a shortest timeframe it should work with all brokers and can automatically place a trade as long as its connected to the internet it should inform where the contracts are placed and for how long
Mql5 indicator 30+ USD
I'm looking for an indicator that gives buy sell signals by placing arrows on the chart Signals must not repaint or be placed with an offset I want it to be accurate enough so j can trade from signal to signal amd actually make profit Do anyone have a strategy and skill to create such an indicatore First priority is to mql5
HI, I am looking for a EA to be installed either on MT5 to pass the the5ers and Fundednext challenge for funded accounts. Rules are found here. https://help.fundednext.com/en/collections/11026230-trading-rules-guidelines https://the5ers.com/high-stakes/ Looking forward to starting this

Informazioni sul progetto

Budget
30+ USD
Per lo sviluppatore
27 USD
Scadenze
da 1 a 2 giorno(i)