Trend detection codes

Viewing 15 posts - 31 through 45 (of 45 total)
  • Author
    Posts
  • #188483 quote
    phoentzs
    Participant
    Master

    I have more than enough such indicators myself. 😁 I’m trying Priceaction Short Term, few candles in the market, many trades and works in almost every market phase (M5, M1). Positive even without a trend indicator. The trend is just a small tool. At least it seems to be working.

    #188539 quote
    icharttop
    Participant
    Junior

    Hi Nicolas the coding language is for coding for MT4 it came from Australian company TradeView System Building for people who are not codes to write there own coding

    Screenshot-466.jpg Screenshot-466.jpg Screenshot-566.png Screenshot-566.png
    #188544 quote
    icharttop
    Participant
    Junior

    this works on MT4

    Screenshot-566-1.png Screenshot-566-1.png
    #188770 quote
    PeterSt
    Participant
    Master

    here’s a short trend indicator that never fails:

    I now see you have a parameter wrong in there !

    icharttop thanked this post
    #189585 quote
    snucke
    Participant
    Veteran

    This is something i’ve used alot on a higher TF

    Timeframe (xxx,updateonclose)
    bull = average[x,y](close) > average[x,y*z](close)
    bear = average[x1,y1](close) < average[x1,y1*z1](close)
    Timeframe (Default)
    thanked this post
    #189590 quote
    nonetheless
    Participant
    Master

    what sort of value would you use for z or z1 ?

    the number after the comma designates the type of MA

    0 = SMA

    1 = EMA

    2 = WMA

    3 = Wilder

    4 = Triangular

    5 = End point

    6 = Time series

    7 = Hull

    8 = ZeroLag

    #189591 quote
    snucke
    Participant
    Veteran

    my bad, this is how it should be

    Timeframe (xxx,updateonclose)
    bull = average[x,y](close) > average[x*z,y](close)
    bear = average[x1,y1](close) < average[x1*z1,y1](close)
    Timeframe (Default)

    For  z and z1 i most often use a value of 1.1-2.0 with a step of 0.1

    #189595 quote
    nonetheless
    Participant
    Master

    the period (x and x1) can only be a whole number.

    5.5 will give the same result as 5, 10.8 will be the same as 10

    #189600 quote
    nonetheless
    Participant
    Master

    if you want to establish a differential between 2 MA periods I would suggest using

    bull = average[x,y](close) > average[(x+z),y](close)

    then optimize the value of z, 1 to 10 with a step of 1 (for example)

    monkeys nuts and thanked this post
    #189601 quote
    snucke
    Participant
    Veteran

    yes, i know.

    the point is also not to test every single variant there is.. = less curvefitting

    im not saying what i do is the best, but it seems to work decently

    #189602 quote
    nonetheless
    Participant
    Master

    it will certainly work perfectly well when x > 10

    I was thinking of smaller periods when it doesn’t quite make sense … but I’m sure you’ve figured that out by now 😁

    #190336 quote
    icharttop
    Participant
    Junior

    Sorry this will not work it has not been Initialised, this is only a function my main EA has been Initialised but not this function.

    #190342 quote
    monkeys nuts
    Blocked
    New

    Sorry this will not work it has not been Initialised, this is only a function my main EA has been Initialised but not this function.

    Hi icharttop

    You may be mixing your platforms possibly?  EA (Expert Adviser) is for MT4, which does require initialisation.  Nothing on the ProRealCode site is for MT4, all code posted here is for ProRealTime.  Hope this helps.

    #190448 quote
    icharttop
    Participant
    Junior

    Thank You may be you can help l been on this ProRealTime for more than 2 years and all l get is NO HELP and discouragement so l decided to learn to coding with someone else called TreadView for MT4 with no coding experience. l built a complex EA that l can start my EA  as a point of origin [ONCE StartTime = Point of Origin and buys 1 contact Lowest ‘Low and and buys another 1 contact on Lowest High  and Calculates to a Point of Destination Sell both contact with no coding experence = Target Price

    Please can you help me to code  // (Doolean ONCE) (FunctionStartTime) If is time > = start hour, Start minute do Set ONCE to true = Point Origan

    #190449 quote
    monkeys nuts
    Blocked
    New

    Hi icharttop

    Sorry to hear that, my experience of this forum has been nothing but positive.  There is a code conversion service provided on this site, I am sure they will be able to help

    https://www.prorealcode.com/free-code-conversion/

    Below are the code snipets for specifying trading times;

    IF (Time >= 08000 AND Time <= 220000)then
    Tradetime=1
    else
    Tradetime=0
    endif
    IF longcondition and tradetime THEN
    BUY PositionSize CONTRACT AT MARKET
    ENDIF
    and below for Highest (or Lowest) over a specified look back range;
    ca1 = high > highest[100](high[1])
    IF ca1 THEN
    BUY 1 shares AT MARKET
    ENDIF
    Good luck!
    icharttop thanked this post
Viewing 15 posts - 31 through 45 (of 45 total)
  • You must be logged in to reply to this topic.

Trend detection codes


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 44 replies,
has 12 voices, and was last updated by monkeys nuts
3 years, 11 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/30/2021
Status: Active
Attachments: 7 files
Logo Logo
Loading...