How to code these conditions?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #46332 quote
    Ricx
    Participant
    Junior

    I want to create a system to use on forex markets following 4 conditions, however I don’t know how to write a code matching them. Can anybody help me out or tell me where I can learn how to write codes like this?

    Conditions to enter long:

    1. Price > MA50
    2. SET UP BAR – Look to buy when close is in the top 25% of the bar’s range
    3. Either the set up bar or the previous bar is the lowest low of the last 5 bars
    4. Enter market on the next bar, only when and if the price trades 1 pip above the set up bar’s high

    Thx in advance 🙂

    #46339 quote
    Despair
    Blocked
    Master
    C1=close>Average[50](close)
    C2=close>=low+range*0.75
    C3=low=lowest[5](low) or low[1]=lowest[5](low)
    IF C1 AND C2 AND C3 THEN
     BUY AT HIGH+PIPSIZE STOP
    ENDIF

    The fina buy condition makes no sense. It states “buy if the bar trades 1 pip over it’s own high”. Obviously this will never come true. I replaced it with a stop order.

    How to code such simple conditions you learn by reading the two manuals proorder/probuilder, very simple.

    Nicolas thanked this post
    #46413 quote
    Ricx
    Participant
    Junior

    Thank you!

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

How to code these conditions?


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Ricx @ricx Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Ricx
8 years, 5 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/16/2017
Status: Active
Attachments: No files
Logo Logo
Loading...