I have made some code that returns no results in back testing. I use the 1Hr time frame and I want to buy in the next hour at a retracement level half way of the previous candle (high to low).
To get the mid point of the previous candle I believe I use the MedianPrice[1] entry… please correct me if I am wrong.
What I can’t figure out is how do I define the current price in the code… the best I can find (searching) is someone said use Close to define the current live price. So if I said open a position when Close = MedianPrice[1] does that mean it will open the position at the mid point of the previous candle? When I back test this and get no results, is that because the back test takes Close as being the close of the candle (which statistically would practically never equal the prior candle mid-point), but when running live will this actually buy in at the point I want, not the candle close at the end of the hour? … or have I got this completely messed up!
1Hr TF enter position on mid-point of prior candle
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