Failed High, Exit at Low – x Points

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #88238 quote
    GraHal
    Participant
    Master

    I feel I’ve reached a low point in my coding … it takes me too long (rest of life suffering! 🙂 ) to get other than simple strategies up and running … but I still have lots of ideas I want to try out.

    I coded a strategy over the weekend and it has entered a trade at a logical point in the price curve, but I want to try a version that will reduce – gains turning into losses – by using the structure of the price curve.

    So you super coders, anybody want to post code to achieve the attached scenario?

    If what I am after is not clear,  please just say.

    Thank you in Anticipation

    Exit-at-Low.jpg Exit-at-Low.jpg
    #88279 quote
    robertogozzi
    Moderator
    Master

    I can think of just two ways to work it out:

    1. trailing stop (and you can use some of the many kinds you can find on this forum)
    2. exit on a filter, in your case it could be an MA that, when broken downwards before reaching TP, will exit the trade

    did you expect some different solutions?

    #88307 quote
    GraHal
    Participant
    Master
    Thank you Roberto … no wonder I was struggling! 🙂
    Yeah maybe I think you supercoders can  code anything that is showing on the screen.

    did you expect some different solutions?

    Yes, I was trying to code up an exit strategy that involved the following  …

    Ha = Highest[x](close)
    price curve followed by
    La = Lowest[y](close)
    price curve followed by
    Hb = Highest[z](close) 
    Hb - Ha > a*pipsize
    Exit at ((Lowest[y](close)) - b*pipsize) stop

    I did get above working and optimising etc, but it kept blowing all the money in the first few weeks! 🙂

    #88312 quote
    GraHal
    Participant
    Master

    Re above … I was attempting to get Ha followed by La followed by Hb by setting the optimisation ranges accordingly.

    So for example my optimisation range for  …

    • Variable x was 100 to 1000
    • Variable y was  50 to 750
    • Variable z was 25 to 500
    #88543 quote
    robertogozzi
    Moderator
    Master

    I dont’t usually care much about curves, but rather horizontal lines plotted (theoretically) by my trailing steps, it’s the market plotting curves!

    I really can’t think of a better way to adapt to curves other than using a Trailing Stop code. You can trace newer highs (or failed newer highs), then new lows, then exit your trade…. that’s just stop trailing!

    GraHal thanked this post
    Exit-at-Low-modified.jpg Exit-at-Low-modified.jpg
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Failed High, Exit at Low – x Points


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by robertogozzi
7 years, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/09/2019
Status: Active
Attachments: 2 files
Logo Logo
Loading...