Always sell after one bar

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #131185 quote
    swedshareswedshare
    Participant
    Senior

    I should know this and I couldn’t find it in the manual… but what is the command to always sell a long position after 1 bar (at next bar open)? It shouldn’t need an extra condition, right?

    IF c1 THEN
    BUY 1 CONTRACT AT MARKET
    "sell at market nextbaropen"??
    ENDIF
    #131188 quote
    VonasiVonasi
    Moderator
    Master
    if longonmarket then
    sell at market
    endif
    
    IF c1 THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF

    If c1 is still true then the orders cancel each other out and you stay on the market.

    swedshare 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

Always sell after one bar


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
swedshare @swedshare Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/11/2020
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...