if touched

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #5163 quote
    Real Pro
    Participant
    Average

    Is it possible to code “buy at market if indicator x is touched”?

    Thanks for the help

    #5166 quote
    Adolfo
    Participant
    Senior

    As for as I know, if is touched buy inmediatly is not possible at the moment, system will wait until current candle finish.

    I found other ways to get similar or better price sometimes when this occours, just let us know wich indicators should be touched to code your premise.

    Cheers.

    #5168 quote
    Real Pro
    Participant
    Average

    Thanks for replying Adolfo.  The MA[5](high) of the previous bar.

    #5184 quote
    Nicolas
    Keymaster
    Master

    Yes it’s possible. You have to test the OHLC values (at least 2 of them) of the previous period if it were above or below the indicator you’d like to test.

    #5196 quote
    Real Pro
    Participant
    Average

    Thanks Nicolas.

    Something like this?

    a = MA[5](high)

    b = L<=a AND H>=a

    What do I do next please?

    #5201 quote
    Nicolas
    Keymaster
    Master

    Almost good! Something like this :

    a = MA[5](high) 
    b = Low[1]<=a AND High[1]>=a
    #5215 quote
    Real Pro
    Participant
    Average

    Great …thank you.

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

if touched


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Real Pro @real-pro Participant
Summary

This topic contains 6 replies,
has 3 voices, and was last updated by Real Pro
9 years, 10 months ago.

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