Coding Trendline Breakout

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #17431 quote
    kurusu
    Participant
    New

    Hi,

    I am a new member at this great community although I already engage myself in coding PRT setups since about 2 years. Up to now I always got ahead by reading the good manuals and researching into this forum.

    But currently I am following an idea which I cannot code offhanded by myself anymore. I rather have doupts if it is possible to develop my setup in PRT at all.

    So here’s my Idea for the long setup, mainly dedicated to indices:

    A sloping Trendline has to be identified by touching three highest highs of different time periodes (for instance 40, 20, 5) within a tolerance range of a few points. If it would be possible to save every barindex and every high of these three candles it would also be possible to describe this line as a linear graph with the basic function y=mx+b inside cartesian coordinates (x=time; y=price).

    A breakout could be identified by setting a stop buy order a few points above the trendline. The price level of the order is defined by calculating the intersection point of the sloping line and a vertical line on current time level.

    My major issue is: How can I resort to time and price of the three needed highest highs? The rest is already coded in my mind 😉

    Can anybody give me a first approach for such an entry setup?

    I hope I explained understandable. If not please feel free to come back to me anytime.

    Many thanks in advance for your support.

    Kjell

    #17439 quote
    GraHal
    Participant
    Master

    Hi Kurusu

    If you put on here the code that is ‘in your mind’ then I’m sure help would soon be forthcoming.

    Cheers
    GraHal

    #17445 quote
    Nicolas
    Keymaster
    Master

    Someone asked me the same thing recently. I put this on hold because of the problem of comparing time scale and price scale in ‘y=ax+b’ , if you have any idea, I’m not too far ..

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Coding Trendline Breakout


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
kurusu @kurusu Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by Nicolas
9 years, 2 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 11/28/2016
Status: Active
Attachments: No files
Logo Logo
Loading...