İş Gereklilikleri
# 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}")
Yanıtlandı
1
Derecelendirme
Projeler
2
0%
Arabuluculuk
1
0%
/
0%
Süresi dolmuş
2
100%
Serbest
2
Derecelendirme
Projeler
66
12%
Arabuluculuk
12
58%
/
42%
Süresi dolmuş
1
2%
Serbest
3
Derecelendirme
Projeler
50
42%
Arabuluculuk
3
33%
/
33%
Süresi dolmuş
4
8%
Serbest
4
Derecelendirme
Projeler
10
50%
Arabuluculuk
6
17%
/
50%
Süresi dolmuş
3
30%
Çalışıyor
5
Derecelendirme
Projeler
4
50%
Arabuluculuk
4
0%
/
75%
Süresi dolmuş
0
Serbest
Benzer siparişler
The Advisor should stop trading if the spread exceeds a selected value. Source code is unavailable. Decompilation may be necessary or any other suggested working solution may be acceptable. Testing should be thorough with proven demonstrable results
I want a forex robot to do my trading because i am a new born trader. A ai trading robot is the best and i am look for one please
Custom Price sound alert indicator
30 - 50 USD
I am looking for developer who can create custom price alert indicator for MT5. The function of alerts in MT5 is fine but it does not allow setting custom sounds for specific charts with ease. For example, one can attach custom sound to new price alert, but if you use a lot of alerts daily (which i do) and want to have each ticker/pair to have its own sound alerts it gets too time consuming. I am looking for
Expert sales installation
30+ USD
i want help on puting my ea in mql5 for sale, help for 10percentage on every sales a higher profit scalper on gold 5minute trader non martingale none hedging mt4 version
Alphapipfx
30+ USD
Sniper Strategy EA -Presicion Forex Trading Bot for MT4 and MT5 Sniper Strategy EA is a fully automated Expert Advisor that executes high-probability forex trades using EMA 50/200 trend detection, RSI 14 momentum filtering, and automatic Support and Resistance zone identification. This bot does not chase price — it waits for price to come to key levels and confirms with multiple indicators before entering, just like
Prop Firm Operations & Technology Manager
500 - 5000 USD
We are looking for a Prop Firm Operations & Technology Manager to help us creating our risk and technology infrastructure for our new prop firm. This is a key role for someone who understands both trading infrastructure and day-to-day prop firm operations . You will be responsible for managing the systems, platforms, configurations, and workflows that keep the firm running smoothly, while also helping us scale
I already have an MT5 trading bot called Omega Bot and I am looking for a marketer / seller who can help me find real buyers. Commission: 100 USD per successful sale Bot details: - MT5 only - Gold and Silver - M15 - ORB strategy - Asia and New York sessions - Automatic risk management - Break-even - Trailing stop - Spread filter - Beginner friendly - Ready settings file - Trial version available - Support after sale
Looking for special EMA cross EA
30+ USD
I want to find a Developer to perform this work and settle payments in this Application. I undertake not to communicate with Applicants anywhere else except this Application, including third-party
Hi guys I’m looking for a coder who’s experienced in one script. The candidate must be familiar with fractals and self similarity. If you can’t code self similarity, please don’t bother contacting me ( respectfully). I just don’t want us to waste each others time. My budget is 100$. If that’s too low for you please, don’t contact me. Only contact me if you can code self similarity and can accept 100$. I will provide
Looking to acquire a good MT5 based EA that works on Gold, forex pairs or BTC. Must be suitable for current market conditions and profitable in backtests. Suitable on 1 Min timeframe to be used on, Must be actively opening many positions throughout the day. Share me the details if this matches something you have or developed. Looking to get this finalised within the weekend
Proje bilgisi
Bütçe
30+ USD
Son teslim tarihi
from 1 to 2 gün