Stopping trading after crossing balance

Forums ProRealTime English forum ProOrder support Stopping trading after crossing balance

Viewing 14 posts - 1 through 14 (of 14 total)
  • #179171

    Hi all.

    I want to add some code that checks to see if the price is moving above or below a zone perhaps increasing a counter than can be then referred to to stop trading if it’s over a certain number in the last x amount of candles.

    The counter must only increase when the price goes from on side to the other not if it goes into the green box and back out the same side.

    Thanks in advance.

    #179258

    There you go:

    The count is cleared anytime one of the two limits changes.
    You can embed this code in your strategy (without the last line) and make your trading decisions according to the value retained by TALLY.

    3 users thanked author for this post.
    #179261

    Link to above added as Log 307 here …

    Snippet Link Library

    1 user thanked author for this post.
    #179262

    You can also try replacing lines 4-5 with:

    This will make limits change a bit more frequently, thus clearing the count more often.

     

    #179399

    Thank you.

    Would it be possible to not reset the counter if the price goes in then out of the same side?  I don’t want it to add to the counter but I also don’t want it to reset.

    To be clear I want the counter to increase each time the price goes from one side to the other in a given period.

    I have the variables “upper” and Lower set in the code I assume I can just switch HH and LL for my terms?

    Thank you for your help, I really appreciate it.

    #179572

    There you go:

    I think this won’t be useful as it is coded, since it hardly counts higher than 1.
    You need to define another way to spot the area, other than using close (I used CLOSE as you posted no hints about the definition of that area).

    1 user thanked author for this post.
    #179654

    Thanks. I should be able to adjust to fit into my algo.

    Can you recommend a good teacher/course/tutorials where I can improve my coding? I’m about halfway through the advanced course and it’s getting to the stage where it’s becoming hard to follow without having exercises etc to practice the previous chapters.

    I’m only about a month into coding, I feel like I’m maybe missing some background knowledge on concepts etc.

    #179662

    Sorry, I don’t know of any course.

    Maybe you can find some on the Marketplace https://market.prorealcode.com/?prcmaf=9f7907cc&from=home.

     

    1 user thanked author for this post.
    #179707

    Maybe you are trying to get in too deep too quick?

    Have you coded up a simple strategy all on your own?

    Using the Assisted Creation tool is good also as then you can see what the code should be and you can then duplicate a System and modify it.  If your modified system system does not run, you can easily compare to the original system which will still run etc.

    1 user thanked author for this post.
    #179981

    Hi. I have created several simple systems and got them working as expected. I now want to move on to more advanced coding/concepts that i can use to create a profitable strategy. I think this would be a much quicker process with a mentor/tutor or a course that had some problems/questions set that needed to be coded and feedback on the code you produce.

    Maybe a programming course that uses a different language with the same concepts?

    #179987

    Did you see these …

    https://market.prorealcode.com/product-category/private-courses/

    1 user thanked author for this post.
    #179997

    Idea for you … have a go at coding these two strategies and then compare your code to what is / will be provided by our resident and kind Coding Wizard Roberto?

    https://www.prorealcode.com/topic/coding-request-for-ema9-wma30-strategy/

    https://www.prorealcode.com/topic/ea-with-multiple-bb/#post-179993

     

    2 users thanked author for this post.
    #180000

    Yes I saw those courses but i was looking for recommendations and maybe something a bit more comprehensive.

    #180001

    Thanks, I’ll give it a go. Should be interesting/funny what I come up with compared to Roberto and I’m sure I’ll learn something. Great suggestion, thanks.

    1 user thanked author for this post.
Viewing 14 posts - 1 through 14 (of 14 total)

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