Specification
# 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}")
Responded
1
Rating
Projects
2
0%
Arbitration
1
0%
/
0%
Overdue
2
100%
Free
2
Rating
Projects
65
11%
Arbitration
12
58%
/
42%
Overdue
1
2%
Free
3
Rating
Projects
50
42%
Arbitration
3
33%
/
33%
Overdue
4
8%
Free
4
Rating
Projects
10
50%
Arbitration
6
17%
/
50%
Overdue
3
30%
Working
5
Rating
Projects
4
50%
Arbitration
4
0%
/
75%
Overdue
0
Free
Similar orders
I need an Expert advisor based on AOX signal . it must have check and handing of trade operation..errors. The main criterin for opening and dosing a position : moving average direction the price is higher than the previous bar Trade lots is input parameter bar
I have a working strategy for Boom and Crash and need a programmer to build an MT5 Expert Advisor (EA) that trades on the 1-Minute timeframe . Key Requirements: Developer should have at least basic knowledge of Boom and Crash trading. EA must work only on candle ticks for Boom and Crash. The EA will receive trade alerts from my indicator and automatically open trades based on those alerts. No duplicate trades should
Description: I am looking for a highly skilled MQL5 + Python developer to code my ULTRA DE TOREN AI EA — a prop firm–compliant, AI-powered trading system. The system must be able to: Pass FundedNext challenges (Stage 1 & 2) in 2-4 weeks or less. Trade funded accounts safely and profitably (8–15% per month growth). Always respect prop firm rules (max daily drawdown, overall loss, profit target, no overtrading). Use
Description: Gildepak is a purchasing cooperative for packaging materials. We need a program to calculate and fairly distribute the annual bonus (received from preferred suppliers) among our member companies (partners and members). The program should work with a set of predefined tables and data flows, and it must be able to import and export Excel files. Main Tables: Member Companies Company ID Company Name Partner
Pocket option bot
40 - 80 USD
Telegram Connection Options part 1. Custom – User enters their own connection details. 2. HEDGE TRADE (Default) – Connects to my source. 3. ONE DIRECTION (Default) – Connects to my source. HEDGE TRADE and ONE DIRECTION details are hidden from users. To use my signals, they must select one (HEDGE or ONE DIRECTION). Only one connection mode can be active at a time (no multiple sources). 2- make it able to receive
based on heikin ashi chart the EA must work as follows Buys when the first green (bullish) Heikin Ashi candle appears and enters on the next candle. Closes the buy when the first red (bearish) Heikin Ashi candle appears after a green one and exits on the next candle. Sells when the first red (bearish) Heikin Ashi candle appears and enters on the next candle. Closes the sell when the first green (bullish) Heikin
Seeking API technology for managing MT4/5 accounts
30 - 200 USD
Seeking a long-term technical partner to support ongoing maintenance and update tasks. Currently requiring an API solution capable of accessing all trading records by inputting MT4/5 login credentials and broker server information, applicable to all brokers supporting MT4/5. This solution must not rely on the MT4 or MT5 client
I used AI to develop my EA, and I need a professional developer to review my Expert Advisor code for MT5 (Python experience preferred). I will provide details once contact is initiated. Thanks. Benga
I need a professional MetaTrader 5 Expert Advisor built specifically for Gold (XAUUSD) scalping. The EA must be safe, reliable, optimized for small and large accounts, and include risk management, AI logic, and full trade control. It should allow both automatic trading and manual trades, with seamless management of both. Core Requirements: 1. Automatic Trade Execution Open trades with multiple lot sizes. Instant flip
Hello, I am looking for an experienced QuantConnect/Lean developer for a trading strategy project on futures (Micro Nasdaq – MNQ) with Interactive Brokers integration (paper + live). The strategy includes several key features: • Multi-timeframe analysis (signal validation across multiple horizons) • Integration of economic news/events into the trading logic • Advanced risk management (daily stop, position sizing
Project information
Budget
30+ USD
For the developer
27
USD
Deadline
from 1 to 2 day(s)