Try changing “SHARES” to “CONTRACTS” depending on what you are trading.
The main problem is probably that you save the new values first, including the closing candle. That means that you don’t get any trades since the close is never lower than TLow or higher than the THigh, since they are included. I asssume this is the problem at least, but I can’t figure out how to fix it right now. Should be fairly easy though.
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