Buying A Bottom of a Market

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #187460 quote
    justadudejustadude
    Participant
    New

    Hi there,

    Does anyone have any ideas about buying a bottom of a market, I’ve been experimenting with trying to create an algorithm that buys if the price falls candle after candle, then flattens out, and starts going back up.

    For Example:

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    
    // Conditions to enter long positions
    c1 = (close < close[1])
    c2 = (close < close[2])
    c3 = (close < close[3])
    c4 = (close < close[4])
    c5 = (close < close[5])
    c6 = (close < close[6])
    //here is the market turning after a fall
    c7 = (close > close[7])
    c8 = (close > close[8])
    
    IF c1 AND c2 AND c3 AND c4 AND c5 AND c6 AND c7 AND c8 THEN
    BUY 1 PERPOINT AT MARKET
    ENDIF
    
    // Stops and targets
    SET STOP pLOSS 5
    SET TARGET pPROFIT 10

    Would it be possible to incorporate a volume spike at the bottom too?

    At the moment, the results are completely random.

    #187467 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    When do you want to start buying the very first time?

    Then you want to buy additional positions as it falls down?

    When shall it exit?

    #187469 quote
    justadudejustadude
    Participant
    New

    [attachment file=”187470″]

    See IMAGE
    Exit will be a fixed amount of points, for example – 7 points

    Thank you.

    forum-pic.png forum-pic.png
    #187472 quote
    pableitorpableitor
    Participant
    Master

    You are just looking for a V shaped bottom which may be the easiest to program but  IMHO   may not be the most bottom.  I would look also for a W , reverse head&shoulders or better yet  a 123 bottom, but those are difficult to detect by  SW

    #187499 quote
    justadudejustadude
    Participant
    New

    Do you have the code for a V shaped bottom, please?

    #187516 quote
    nonethelessnonetheless
    Participant
    Master

    It only takes 3 candles to make a V, but how will you know if it’s likely to continue, or just a bounce within the previous trend?

    You can’t do it with price action alone. Try adding a fast MA, for example:

    ma = hullaverage[10](typicalprice) // can also be written ma = average[10,7]
    long = ma > ma[1] and ma[1] < ma[2]
    short = ma < ma[1] and ma[1] > ma[2]

    On a 4 hour TF this is often a “fairly reliable” indicator of changes in the primary trend.

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Buying A Bottom of a Market


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
justadude @justadude Participant
Summary

This topic contains 5 replies,
has 4 voices, and was last updated by nonethelessnonetheless
4 years, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 02/03/2022
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...