Automatic trading not working?

Forums ProRealTime English forum ProOrder support Automatic trading not working?

Viewing 12 posts - 1 through 12 (of 12 total)
  • #78209

    So I’ve made a beginner system, but that’s not important I’ve set it up for when stochastic goes below 75 it should sell and when above 25 it should buy. why the hell is it not doing anything?

     

    I placed some red lines where I belive it should’ve taken action but it didn’t…

     

    any suggestions welcome thanks!

    #78211

    We need code to tell what’s going wrong.

    1 user thanked author for this post.
    #78292

    Hi Robert, good idea. Thank you for your reply.

     

    <

     

    #78297

    It is difficult to tell from your image as I can’t tell which lines are which averages but your code expects the cross and the level of stochastic conditions to be met on the same bar whereas from your image it appears that you are expecting the cross to happen and then a trade to be entered when the stochastic level is crossed a few bars later. Am I right?

    1 user thanked author for this post.
    #78301

    Yes that’s correct, thank you for your reply. Id like the stochastic to work after the cross happens on the SMA. How would you go about fixing this? I’m very much a beginner…

    #78312

    You would need to set a flag when each event happens and then only enter when both flags are true. Something like this might work but I’ve not tested it:

     

    1 user thanked author for this post.
    #78425

    Thanks for your reply Vonasi.

    I’ve not come across this problem before, it says I have a syntax error on line 34 yet I don’t have a line 34? how on earth do I fix that?

    Assistance much appreciated.

     

     

     

     

     

    #78428

    Line 12 and line 20 are both missing a matching ENDIF, so at the end of the code an error message is output.

    1 user thanked author for this post.
    #78433

    ..also line 27 has an extra = instead of a – sign..

    More haste, less speed, Vonasi!

    1 user thanked author for this post.
    #78461

    More haste, less speed, Vonasi!

    Looking at the time that I posted it is probably more haste, less beer!

    I think we should all leave a line or two out of our code when providing it for others and see if they can work it out on their own. Nothing in life should come too easy!

    1 user thanked author for this post.
    #78482

    Of course the endifs where missing! I managed to correct line 27 myself but am still learning. Thanks for your help!

    #78488

    Just to redeem myself the above is the corrected code – I still have no idea if it works or is what you want but at least this one was done after only one beer! 🙂

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

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