OnChart Stochastic as exit factor LONG

Forums ProRealTime English forum ProOrder support OnChart Stochastic as exit factor LONG

Viewing 15 posts - 1 through 15 (of 18 total)
  • #88450

    I am trying to use the indicator above as an exit factor for LONG position (BearSTOCH), and for some reason it does not work.

    I normally combine different indicators for entry/exit purpose in automatic trading, but as soon I include this one, no trades in simulation mode occur, not even a purchase, that should not be affected as I am only adding a condition in the exit conditions… Anyone with opened eyes today? THANKS!

    #88454

    Are you sure that it doesn’t open one position and never close it? This would show zero in the strategy report.

    1 user thanked author for this post.
    #88461

    Have you got If LongonMarket or If ShortonMarket as part of your Exit Strategy?

    We can – on occasions-  get well weird things happening if we don’t use above.

    1 user thanked author for this post.
    #88474

    Thank you Vonasi and GraHal being active on a Sunday!

    Part of the Exit Strategy is: or longonmarket and BearSTOCH

    For the same interval, it normally simulates aprox 30 trades, and zero when I add the extra exit condition as described. If I replace BearSTOCH with any other indicator strategy, it works.  Kind of weird…

     

    #88475

    Have you tried adding:

     

    1 user thanked author for this post.
    #88476

    Without the full code we are guessing, but how are you judging that there are zero trades?

    Have you looked in the Detailed Report as you may have loads of 0 bar trades which are closing / exiting just as soon as they have opened??

    I’ve had  the above scenario before now and on the equity curve it looks like nothing is happening and zero / no  trades show on the Positions Indicator.

    Just a few more thoughts / ideas to look at.

    1 user thanked author for this post.
    #88479

    Thank you both of you!

    Yes I tried adding DEFPARAM PRELOADBARS = 20, but no change

    Judging by probacktesting my system without changing anything except adding the exit condition.

    #88483

    I think I’m with GraHal about needing the code as there is no logical reason why just adding the indicator code and an extra exit condition should stop a strategy from opening a position.

    Have you tried CALLing the indicator rather than including the code in your strategy?

    #88484

    Judging by probacktesting my system without changing anything except adding the exit condition.

    So you have nothing at all showing in the Detailed Report as attached ?

    #88527

    Correct, like it was blocked. Never mind, I just look for a similar indicator 🙂 Thanks for all your time!

    #88539

    Thanks. Must admit that I have not used the call function, and it seems that I am doing something wrong as I get a syntax error…

    #88584

    How to use CALL is shown clearly here:

    https://www.prorealcode.com/documentation/call/

    Call the indicator in just one line to get the multiple values that it returns in the RETURN line.

     

    1 user thanked author for this post.
    #88587

    Thanks, I saw that, and I could still ignore the clearness 🙂

    I did try the below, but missed out something as I got the same syntax error …

     

    #88589

    The indicator, as it is in the library should be CALLed with these parameters (those to the left of “=” can be used or ignored as suits you best). As for the 8 parameters within brackets they can be hard coded inside the indicator itself and, in such case, brackets can be omitted at all. In all cases, whatever variable you are using, no matter where you write it, MUST  have been previously defined:

    reading documentation as outlined by Vonasi or browsing the thousands of lines of code in the forum (or watching some training video, here or on Youtube) will help you get the hang of it.

     

    2 users thanked author for this post.
    #88602

    Thank you very much Roberto!

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

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