Coding the stochastic

Forums ProRealTime English forum ProOrder support Coding the stochastic

Viewing 8 posts - 1 through 8 (of 8 total)
  • #70256

    Hi all,

    I have some problem coding the stochastic. I want to code the stochastic and I think I have it right, but following the demo account on live, I can see the orders are launched two bars later than it should. That make me think that the stochastic I have coded is different than the stochastic I have as indicator in PRT.

    I have set the Stochastic to (79,3,1) in the indicators section in PRT, but when it comes to coding only shows two parameters: Stochastic [79,3]. So, I would like to launch a BUYING order when the stochastic (79,3,1) crosses over the line of 50.

     

    I thought that I had it right, but it doesn’t seems to work right.

    What I did:

    Anyone can tell me if this is right??

    Thanks in advance,

    Juan

    #70257

    1. (close)  is missing at the end of line 1, but it is probably assumed so it shouldn’t be the cause, but documentation has it;

    2. your text talks about 79, while your code reads 76, could this be the problem?

    1 user thanked author for this post.
    #70272

    1 means the period of the signal line of the stochastic, which is a simple moving average of 1 period in your example. If you are not using it,  and since a 1 period sma is the same value of the stochastic, your code is already good.

    1 user thanked author for this post.
    #70278

    Hi Roberto and Nicolas,

    Roberto: Yes, you are right about 79 and 76. It was just my mistake here. In the code it is correct (76). I think, the delay, must be a code reading problem of PRT demo. I assumed close at the end was inferred.

    Nicolas: I am not using D value in the code, so I have set it up to one.

    I will continue working on this with more confident, knowing than the indicator and the code are fine.

    Thank you very much to both of you.

    Juan

    #103909

    How do I code a stochastic with a  8-3-3 setting?  Thanks!

    #103910

     Please update your country flag in your profile. Thank you 🙂

     

    #103911

    Robert Berenbaum – please do not double post! It does not get you a faster answer. It just wastes the time of those who are trying to help you. I will delete your identical post in the ProScreener forum to save others from wasting their time trying to provide you with an answer that you have already been given here.

    #103932

    I also answered the same question in the documentation section! 👿

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

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