x = any predefined range from the market open, i.e. If x = 15 and market open was 8am GMT, then we would have a range from 8am-8.15am, if x was 30, then we would have range from 8am-8.30am.
y = the target points above or below a break of x range. (user defined)
z = stop position. hard-coded number of points for your stop from entry.
Rules Take a break of the x range (+2pts) and the target is y. Stop is z. Thanks in advance.
I don’t know what you mean by “take a break of range x” but maybe this will help
Z = 25
A = 50
B = 40
If currenttime=090000 then
Range1= open
Endif
If currenttime = 091500 then
Range2=close
Endif
If Range2>Range1 And Range2-Range1 > Z then
Buy 1 contract at market
Set Target Profit A
Set Stop Loss B
Elseif Range1 >Range2 And Range1-Range2 > Z then
Sellshort 1 contract at market
Set Target Profit A
Set Stop Loss B
Endif
:
I couldn’t use the PRT function because I am on mobile.
So it seems I am taking multiple trades per day. I only want to have one trade per day.
So, imagine the open is 8am and I have defined a range of 15mins.
Therefore, I want to trade a break higher or a break lower of that opening 15m range until either Y is hit (hardcoded target points) OR Z is hit (hardcoded stop number of points)
This current script is not quite hitting the mark with that as it is taking multiple trades in a given day. Thanks in advance for details provided in order to correct it to allow this.
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue