Long entry after the last five bar dropped x points

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #143477 quote
    CrillezzCrillezz
    Participant
    Veteran

    Hey! I want some help with an entry code. It should go long if the last 5 bars have dropped x number of points.
    I have searched here on the forum but can not find anything.

    #143481 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    There you go:

    X = 150 * pipsize
    Diff = close - close[4]
    If Diff >= X then
       Buy at market
    Endif

    replace 150 with the number of pips that best suit you.

    #173367 quote
    deletedaccount051022deletedaccount051022
    Participant
    New

    Thank you Roberto – very useful piece of code

    robertogozzi thanked this post
    #173374 quote
    VinzentVegaVinzentVega
    Participant
    Veteran

    Tested it with trailing. Had some strange entrys.

    Unbenannt-2.png Unbenannt-2.png Dax-5m-Entryfishing.itf
    #173380 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Entries are perfect, you can append this line to your code to easily spot signals in the variable windows that is opened by ProBackTest:

    graph Diff >= X

    your IF at line 7 is a bit weird, as it is mot closed until the end (with the very last ENDIF), thus leaving your Trailing Stop idle most of the time. I suggest that you move the very last ENDIF to line 12, unless this behaviour is intentional.

    #173381 quote
    VinzentVegaVinzentVega
    Participant
    Veteran

    I suggest that you move the very last ENDIF to line 12

    When i do this, then the result became worst

    Unbenannt-3.png Unbenannt-3.png
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

Long entry after the last five bar dropped x points


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Crillezz @crillezz Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/06/2020
Status: Active
Attachments: 3 files
ProRealCode ProRealCode
Loading...