Ask for a protective breakout support

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #183018 quote
    david24david24
    Participant
    Junior

    Hi everyone,

    I would like to ask for help in order to build a system that open and close a position each time a support is crossed.

    For example, the system opens a position (Oil – US Brut Market) under 7000 pts and close automatically the position above 7000 pts. In order to avoid in a choppiness environnement too often trades opened/closed I add a EMA that could cross under / above this level.

    In addition, I would like to leave my position opened if the market is in a bearish trend and close it only if the trend is bullish.

    Thanks in advance,

    David

    Support-.001.jpeg Support-.001.jpeg
    #183070 quote
    JSJS
    Participant
    Master

     

    MySupport = 7000 //Fixed Support
    MyEMA = Average[20,1](Close) //20 days EMA
    
    If Close < MySupport and MyEMA Crosses Under MySupport then
    SellShort xNumber Contract at Market
    EndIf
    
    If MyEMA / MyEMA[1] > 1 then //Bullish Market
    ExitShort at Market
    EndIf
    david24 thanked this post
Viewing 2 posts - 1 through 2 (of 2 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

Ask for a protective breakout support


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
david24 @dav24p Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by JSJS
4 years, 10 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 12/08/2021
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...