Stochastic K and D lines

Forums ProRealTime English forum ProOrder support Stochastic K and D lines

Viewing 15 posts - 1 through 15 (of 21 total)
  • #69818

    Hi all,

    I have some problem coding the stochastic. I have set the Stochastic to (79,3,4) in the indicators section, but when it come to coding only shows two parameters: Stochastic [79,3]. I would like to create a condition when %K crosses over %D or viceversa, but I don’t see it.

    I have reviewed the library in search of similar strategies with stochastic but nothing so far.

    Any suggestions?

    Thanks so much in advance.

    Juan

    #69827

    I think i got it. I found an old result from Nicolas in the Forums.

    Thanks anyway,

    Juan

    #92211

    Did you manage to write the correct screener code for the stochastic crossover?

     

    If you did would you be able share it please?

     

    Thank you

    #92218

    Did you manage to write the correct screener code for the stochastic crossover?
    If you did would you be able share it please?
    Thank you

    Juan Salas‘s code is correct, to code a crossing just write:

    If you search in the library for a Stochastic screener you’ll find some.

    #92235

    Did you manage to write the correct screener code for the stochastic crossover?

    If you did would you be able share it please?

    Thank you

    Hi, disciplinet,

    Roberto is right. I am sending you a piece of code similar to what Roberto sent:

    I hope it can help you

    1 user thanked author for this post.
    #108375

    I am have this code for stochastic in hourly TF. Pro Order should be placing order when, %K is above the %D (ie. %K>%D) and value of %D should be 32 and 75 before an order is placed. This is a bullish condition

    But I have multiple orders being placed even when stochastic is bearish. All conditions should be true to open a buy position ie c2 and c3 and c4 should all be true..

    Why is this dependency occurring with Pro Order Tests?

     

    I have attached an image that clearly shows the stochastic does not meet the conditions.

    #108377

    Why line 4 refers to the 3rd previous candle?

    This could be the logical error.

    #108380

    Ok thanks for pointing that out – that was an error. I corrected it, it improved by removing some of these orders, but there are still some that should not be there.

     

    If you see the screenshot below, 2 orders are placed in same area, the first one is placed when the stochastic is clearly bearish.

    How can i fix this? I want it to place orders when stochastic is bullish only.

     

    #108382

    Without the complete code it is impossible to tell, it is likely conditions are not linked with AND.

    Or if you use a smaller default TF a trade could be entered while conditions have changed because variables are updated only when the 1-hour bar closes.

    If you need further help you should post your code to enable readers to replicate your trades, also specifying instrument and default TF used.

     

    #108386

    Here is the code, its daily and hourly TF being used,

     

    #108390

    What TF did you take that pic from?

    When you look at the daily chart keep in mind that previous daily bars only show the pic at closing time, while you did not use updateonclose thus at runtime values can be differrnt from hour to hour.

     

    #108391

    I took that snap shot in Hourly TF. Daily TF seems to be working fine

    Even if daily is not using update on close, hourly conditions should still be respected isn’t it?

    #108392

    What time and instrument were those wrong trades?

    #108393

    20 Aug to 31 Aug – Instrument is Spot Gold

    #108402

    For Spot GOLD I have no trades opened from Aug.20th through Aug 31st.

Viewing 15 posts - 1 through 15 (of 21 total)

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