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
- 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
- Form 8-K - Current report • Edgar (US Regulatory) • 01/30/2024 09:05:22 PM
- Form 424B3 - Prospectus [Rule 424(b)(3)] • Edgar (US Regulatory) • 12/18/2023 10:30:26 PM
- Form 8-K - Current report • Edgar (US Regulatory) • 12/18/2023 10:29:49 PM
Avant Technologies Equipping AI-Managed Data Center with High Performance Computing Systems • AVAI • May 10, 2024 8:00 AM
VAYK Discloses Strategic Conversation on Potential Acquisition of $4 Million Home Service Business • VAYK • May 9, 2024 9:00 AM
Bantec's Howco Awarded $4.19 Million Dollar U.S. Department of Defense Contract • BANT • May 8, 2024 10:00 AM
Element79 Gold Corp Successfully Closes Maverick Springs Option Agreement • ELEM • May 8, 2024 9:05 AM
Kona Gold Beverages, Inc. Achieves April Revenues Exceeding $586,000 • KGKG • May 8, 2024 8:30 AM
Epazz plans to spin off Galaxy Batteries Inc. • EPAZ • May 8, 2024 7:05 AM