I am feeling I am about to hit a brick wall… for several weeks I have tried to learn and asked for your help regarding a simple breakout strategy:
go long above the high of the 0945-1000 bar
or go short below the low of the same bar
i defined a target profit and a stop loss
i wanted only 1 trade if the first trade was a win, else try a second and final trade for the day
i wanted to trade only during the 0930-1600 NYC session timeframe
i was using YM instrument
Below is my code (incorporates a lof of tweaks from the PRT community).
I have never managed to have trades placed in the 1000-1015 bar right after the breakout bar. I repeat: the system never placed an order in that first eligible bar; the earliest would always be the 1015-1030 bar.
I truly believe my code has mistakes, however thus far, no one was able to solve what I initially thought would be an easy set of instructions. I did make a lot of progress with a few specific brilliant minds here in the PRT community but the code never managed to place orders in the first eligible bar (1000-1015).
If someone can point me in the right direction, I would be extremely thankful. I am new to PRT but I really like it (and the community as well), however this is becoming a very tough experience for me to believe there is still light at the end of the tunnel…
Many thanks either way everyone.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
DEFPARAMCUMULATEORDERS=FALSE// to prevent adding to positions
Hello! In order to enter on the 10:00 candle, everything must be fulfilled on the 9:45 candle. This code is useful for entering on the 10:00 candle on the breakout.
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