def trading_strategy(data, volume_threshold=500000):
# Initialize variables
position = 0
profit = 0
stop_loss = 0
# Iterate through the data
for i in range(1, len(data)):
# Check if the current volume is greater than the threshold
if data['Volume'] > volume_threshold:
# Enter a long position
position = data['Close']
stop_loss = data['Close'] * 0.99 # set stop loss to 1% below entry
# Close the position if the stop loss is reached
if position > 0 and data['Low'] <= stop_loss:
profit += position - stop_loss
position = 0
stop_loss = 0
if (data['Close'] > data['Open'] and data['Close'] > data['Close'][i-1] and data['Open'] < data['Open'][i-1]) or (data['Close'] < data['Open'] and data['Close'] < data['Close'][i-1] and data['Open'] > data['Open'][i-1]):
return True
return False
def trading_strategy(data):
# Initialize variables
position = 0
profit = 0
stop_loss = 0
# Iterate through the data
for i in range(1, len(data)):
# Check if the current candle is an engulfing pattern
if detect_engulfing(data.iloc[i-1:i+1]):
# Enter a long position if the market marker bullish
if data['Close'] > data['Open']:
position = data['Close']
stop_loss = data['Open']
# Enter a short position if the market marker is bearish
else:
position = data['Open']
stop_loss = data['Close']
# Close the position if the stop loss is reached
if (position > 0 and data['Low'] <= stop_loss) or (position < 0 and data['High'] >= stop_loss):
profit += position - stop_loss
position = 0
stop_loss = 0
Recent QNRX News
- Quoin Pharmaceuticals Announces International Expansion of Ongoing Clinical Trials for Netherton Syndrome • GlobeNewswire Inc. • 06/27/2024 12:00:00 PM
- Quoin Pharmaceuticals to Sponsor the Foundation for Ichthyosis & Related Skin Types (FIRST) 2024 National Conference • GlobeNewswire Inc. • 06/25/2024 08:05:00 PM
- Quoin Pharmaceuticals Announces Signing of Research Agreement with University College Cork (UCC), Ireland • GlobeNewswire Inc. • 06/12/2024 12:00:00 PM
- Form 424B3 - Prospectus [Rule 424(b)(3)] • Edgar (US Regulatory) • 05/10/2024 08:10:54 PM
- Quoin Pharmaceuticals Provides Corporate Update and Announces First Quarter 2024 Financial Results • GlobeNewswire Inc. • 05/09/2024 12:30:00 PM
- Form 424B3 - Prospectus [Rule 424(b)(3)] • Edgar (US Regulatory) • 05/08/2024 08:00:53 PM
- Quoin Pharmaceuticals to Announce First Quarter 2024 Financial Results on May 9, 2024 • GlobeNewswire Inc. • 05/02/2024 08:10:00 PM
- Quoin Pharmaceuticals Provides Corporate Update and Announces Fourth Quarter and 2023 Financial Results • GlobeNewswire Inc. • 03/13/2024 08:05:00 PM
- Mixed Futures Amidst Quiet Economic Schedule; Oil Prices Climb • IH Market News • 03/13/2024 11:03:39 AM
- Form 424B3 - Prospectus [Rule 424(b)(3)] • Edgar (US Regulatory) • 03/08/2024 09:06:10 PM
- Form 424B3 - Prospectus [Rule 424(b)(3)] • Edgar (US Regulatory) • 03/08/2024 09:04:19 PM
- Form 8-K - Current report • Edgar (US Regulatory) • 03/08/2024 09:01:51 PM
- Quoin Pharmaceuticals Announces Fourth Quarter and 2023 Financial Results and Corporate Update Conference Call to be held on Thursday March 14th at 8:30 am ET • GlobeNewswire Inc. • 03/07/2024 09:05:00 PM
- Form 424B4 - Prospectus [Rule 424(b)(4)] • Edgar (US Regulatory) • 03/06/2024 10:07:52 PM
- Form 8-K - Current report • Edgar (US Regulatory) • 03/06/2024 09:01:40 PM
- Quoin Pharmaceuticals Announces Pricing of $6.5 Million Public Offering • GlobeNewswire Inc. • 03/05/2024 01:00:00 PM
- Form 424B3 - Prospectus [Rule 424(b)(3)] • Edgar (US Regulatory) • 03/04/2024 10:27:14 PM
- Quoin Pharmaceuticals Announces FDA Clearance to Recruit Teen Subjects into Both Ongoing Netherton Syndrome Clinical Studies • GlobeNewswire Inc. • 03/04/2024 01:00:00 PM
- Form DEF 14A - Other definitive proxy statements • Edgar (US Regulatory) • 02/27/2024 11:01:59 AM
- Form EFFECT - Notice of Effectiveness • Edgar (US Regulatory) • 02/15/2024 05:15:38 AM
- Form SC 13G/A - Statement of acquisition of beneficial ownership by individuals: [Amend] • Edgar (US Regulatory) • 02/14/2024 01:11:42 AM
- Form S-1/A - General form for registration of securities under the Securities Act of 1933: [Amend] • Edgar (US Regulatory) • 02/13/2024 09:50:20 PM
- Form PRE 14A - Other preliminary proxy statements • Edgar (US Regulatory) • 02/13/2024 09:30:14 PM
- Form S-1 - General form for registration of securities under the Securities Act of 1933 • Edgar (US Regulatory) • 02/12/2024 10:12:12 PM
- Quoin Pharmaceuticals Files U.S. and International Patent Applications for Novel Netherton Syndrome Combination Product • GlobeNewswire Inc. • 02/08/2024 01:00:00 PM
Glidelogic Corp. Becomes TikTok Shop Partner, Opening a New Chapter in E-commerce Services • GDLG • Jul 5, 2024 7:09 AM
Freedom Holdings Corporate Update; Announces Management Has Signed Letter of Intent • FHLD • Jul 3, 2024 9:00 AM
EWRC's 21 Moves Gaming Studios Moves to SONY Pictures Studios and Green Lights Development of a Third Upcoming Game • EWRC • Jul 2, 2024 8:00 AM
BNCM and DELEX Healthcare Group Announce Strategic Merger to Drive Expansion and Growth • BNCM • Jul 2, 2024 7:19 AM
NUBURU Announces Upcoming TV Interview Featuring CEO Brian Knaley on Fox Business, Bloomberg TV, and Newsmax TV as Sponsored Programming • BURU • Jul 1, 2024 1:57 PM
Mass Megawatts Announces $220,500 Debt Cancellation Agreement to Improve Financing and Sales of a New Product to be Announced on July 11 • MMMW • Jun 28, 2024 7:30 AM