I’m attempting to code a ProOrder trading system and I need to code a condition for a position.
The condition is where the difference between two moving average values is greater than or equal to a value, say 5 for example. So it would need to take into account at any one point the two values of two different moving averages and act where the difference between the two values is greater than 5 as an example.
Can someone point me at or provide an example of how this should be coded please? Hopefully I have explained it well enough.
You already have everything to do it! You got your 2 MA values (MA1 and MA2), you only need to test if one is superior to the other one. The difference between them is already calculated with “difference”..
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