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
66
12%
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 have a live MT5 account with Myfxbook verified track record (88% return, 17% DD, 100K+ trades). Trade copier is ready. I need a sales system to attract copy traders. You decide the approach — landing page, email, or any strategy you think works best
Need MT4 EA/ROBOT required
30+ USD
I am looking for an experienced developer to create a custom MT4 Expert Advisor (EA) / trading robot. Requirements: Fully automated trading system for MetaTrader 4 Clear entry and exit strategy (can be based on indicators, price action, or a custom logic) Risk management features (lot size control, stop loss, take profit, trailing stop) Ability to run on multiple currency pairs Option to adjust settings (risk %
Modification for Forexmts
50+ USD
I am a forex trader I want to help to all the other traders with translating and online cources so which is interested buy this package and join us thank you
Kenyan Editor
30+ USD
1.a specific robot to earn for a quick and reasonable trade all over. The Idear of being specific makes me perfect, I want this to be clear that make me a high luxurious person will describe me and I will promise to advertise the market both internally and externally
i need the EA same working on trading view Hikin Ashi chart with same specifications and rules on mt5 Rules as per in script is available when applied on chart need to check on Hikin Ashi chart 1. Buy trade when purple candle closed above last any black candle high on Hikin Ashi & avoid long abnormal candle & if market makes more than 20-30 candles without changing the color 2. Buy when purple candle close above its
I have my own strategy in 1min. I want it convert to a bot. Please reach me only coding experts. I dont want bit makers from Ai. Demo version should be provided for confirmation
Siraj Durrani
30 - 50 USD
Title: Need MT4 Expert Advisor for XAUUSD (SMC/ICT Strategy) Requirements: I need a professional MT4 Expert Advisor (EA) for XAUUSD based on Smart Money Concepts (SMC) / ICT strategy. Features: - Platform: MetaTrader 4 (MT4) - Symbol: XAUUSD - Automatic Buy and Sell trades. - Detect market trend automatically. - Use Break of Structure (BOS) and Change of Character (CHoCH) for trend confirmation. - Enter trades only
Xauusd to gold
35+ USD
The EA must be fully automated , backtest-friendly , prop-firm-safe , and built with a clean modular architecture . Core Strategy Requirements 1. Higher Timeframe Bias Use D1 and H4 . Use 200 EMA as trend filter: If price is above 200 EMA on both D1 and H4 -> allow BUY only If price is below 200 EMA on both D1 and H4 -> allow SELL only If D1 and H4 are not aligned -> no trade 2. Market Structure Module Detect and
Eagoldcent
30 - 200 USD
I need an MT4 & MT5 Expert Advisor for ALL pair support Cent Account. Features: Platform: MT4 & MT5 Pair: All Pair Account Type: Cent Account Buy and Sell Fixed Lot Start (user input) Lot Exponent / Multiplier (user input) PipStep / Grid Distance (user input) Take Profit (user input) Maximum Trades (user input) Magic Number (user input) Inputs: Start Lot = 0.01 Take Profit = 40 Lot Exponent = 1.50 PipStep = 40 Max
50 ( 1s )
30 - 100 USD
I want a robot to trade volatility 50(1s) only . A robot that can make me about 100usd in less then a hour but it has to take very short entries for example 3/5 entries at the same time with a very tide stop loss and the tp to be about 10usd
Project information
Budget
30+ USD
Deadline
from 1 to 2 day(s)