Техническое задание
# 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}")
Откликнулись
1
Оценка
Проекты
2
0%
Арбитраж
1
0%
/
0%
Просрочено
2
100%
Свободен
2
Оценка
Проекты
66
12%
Арбитраж
12
58%
/
42%
Просрочено
1
2%
Свободен
3
Оценка
Проекты
50
42%
Арбитраж
3
33%
/
33%
Просрочено
4
8%
Свободен
4
Оценка
Проекты
10
50%
Арбитраж
6
17%
/
50%
Просрочено
3
30%
Работает
5
Оценка
Проекты
4
50%
Арбитраж
4
0%
/
75%
Просрочено
0
Свободен
Похожие заказы
BARON 2026
30+ USD
I was delighted with how the program unfolded—grateful for the successful completion and the learning experience. However, the work disappeared without a trace. I would appreciate it if you contacted me here by searching for "febrero59" at the top. Thanks, febrero59
Zwivhuya
100+ USD
I would like to be part of this trade because i want to help my family out of the hopeless life we are living now . i thoughts going to school will help me get better job but no i am still sitting for us to eat at home i have to sell my body to someone and get pay with that small money i can buy bread and cooldrink for my family that we can not sleep with emyter stomach
Expert advisor for indicator
50+ USD
I need an Expert Advisor that trades by signal of ADX and Moving Average indicators. It must check and correctly process possible errors in trading operations. The main criteria of opening and closing positions , direction of Moving Average, Price of last bar . Set the number of lots to trade as an input parameter
I need an Expert Advisor based on Vantage signals.It must have check and handling of trade operation errors. The main criteria for opening and closing a position: moving average direction the price is higher the previous bar Trade lots is an input parameter
EA to buy 0.5 lots of BTCUSD on MT5 for Exness Broker
100 - 150 USD
I need you to develop an MT5 Expert Advisor (EA) in MQL5 specifically for BTCUSD , primarily trading on the 1-minute timeframe (M1) . The goal is to build a professional, rule-based automated trading system that trades strong impulsive BTCUSD moves in the direction of the trend , while using strict risk and money management. 1. CORE STRATEGY The EA should NOT randomly buy or sell. The basic sequence should be: Trend
Expert Needs to integrate Volume Density ( Ticks Per Point ) Adaptive Volume Baseline ( Apply with experience ) , Order Flow Tick Volume Based ( required integration is for smooth execution ) , Every other requirement already exists by the expert , True Objective : To identify the true transition from Accumulation to Expansion/Distribution leading to Breakout capturing participation while eliminating false breakouts
Advance XAUUSD MT5 INDICATOR
30 - 50 USD
I need a professional XAUUSD signal indicator for MetaTrader 5, written entirely in MQL5 (.mq5). IMPORTANT: This is NOT an auto-trading EA. It must never open, close or modify trades. It only analyzes XAUUSD and generates signals + MT5 push notifications. 1. Multi-timeframe analysis: H4 → H1 → M30 → M15 → M10 → M5 → M1. 2. Detect market structure: - Swing High / Swing Low - BOS - MSS - CHOCH - Bullish/Bearish HTF
Hi. I am looking for an experienced MQL5 developer for an advanced XAUUSD MT5 indicator. Before choosing a developer, I would like to see a small proof-of-concept or an example of a similar indicator you have already developed. My final indicator must be written from scratch in MQL5 and I must receive the complete .mq5 source code + compiled .ex5 . Main requirements: XAUUSD MT5 / MQL5 Indicator only — NO AutoTrading
Title: Advanced XAUUSD MT5 Indicator – MQL5 Source Code Required I need a professional MT5 indicator written from scratch in MQL5 (.mq5) for XAUUSD. The indicator must be signals/analysis only — AutoTrading must remain OFF . I need the complete editable .mq5 source code, not only an .ex5 file. The system should analyze multiple timeframes: H4 → H1 → M30 → M15 → M5 → M1 . Required logic: Higher-timeframe
NextGen
30 - 50 USD
Hello, Before I select a developer, please confirm that you can implement the complete MT5 EA exactly according to my specification. The most important requirements are: 1. Strict NO-REPAINT / NO-HINDSIGHT logic. 2. Sweep, MSS/BOS, Displacement, FVG, Order Block and POI must be defined algorithmically before coding. 3. M1 and M5 confirmation logic. 4. Zero-Float Entry logic. 5. MT5 terminal alerts and immediate MT5
Информация о проекте
Бюджет
30+ USD
Сроки выполнения
от 1 до 2 дн.