The code is a simple trading strategy. Open-range breakout. The CSV file contain

Need help with assignments?

Our qualified writers can create original, plagiarism-free papers in any format you choose (APA, MLA, Harvard, Chicago, etc.)

Order from us for quality, customized work in due time of your choice.

Click Here To Order Now

The code is a simple trading strategy. Open-range breakout.
The CSV file contain

The code is a simple trading strategy. Open-range breakout.
The CSV file contains dates and prices for a 5-minute interval.
On the screenshot, each bar (red or green) contains: open, close, and the highest and lowest practices for each 5-minute interval.
Date Open Close High Low
The logic for this strategy is to calculate max profit and return the value to the excel file.
First we define time frame between 09:00 and 12:00
Next we define open_rage – which is High and Low of the first 5 min bar
Next entry criteria High of 09:00 will be open_range_high and Low will be open_range_low
The logic for long trade is
if High at any 5min interval from 09:05 till 12:00 is greater than open_range_high and Low is greater than open_range_low then return max profit ( which High – open_range_high)
and vice versa for sell short trade
The code returns open_range value – that is correct
Max long profit – but stop loss for long trade is not working – code returns max proft even if the low is less than open_range_low
Max sell profit

Need help with assignments?

Our qualified writers can create original, plagiarism-free papers in any format you choose (APA, MLA, Harvard, Chicago, etc.)

Order from us for quality, customized work in due time of your choice.

Click Here To Order Now