Why does the code not provide a signal?

Forums ProRealTime English forum ProOrder support Why does the code not provide a signal?

  • This topic has 2 replies, 2 voices, and was last updated 6 years ago by avatarEB.
Viewing 3 posts - 1 through 3 (of 3 total)
  • #39783
    EB

    Hi,

    I a struggling with the fact that the stochastic does not always give a signal. I don’t understand why. Here is the simple code:

    It says buy when the stochastic is below 20. The thing is that sometimes it provides this signal, but sometimes not. I don’t know why. See attachment. I should expect that at 10.35 hrs, 14.20 hrs and 16.45 hrs it would provide a buy signal.

    Can anybody tell me why this is not the case?

    Thank you,

    Edward

    #39785

    Your attachment is empty. If you want to add picture, just upload them in any supported format such as .png .jpg, etc..

    The problem in your code is that your are only storing value of the stochastic condition into your c2 variable when you are not on market. You should test your condition outside the “onmarket” conditional block.

    #39794
    EB

    Hi Nicolas,

    Thank you for your quick reply. Ok, so I should not use the onmarket conditional block. That indeed seems to be the issue here. And use DEFPARAM Cumulateorders = False.

    Edward

Viewing 3 posts - 1 through 3 (of 3 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login