Always sell after one bar

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #131185 quote
    swedshare
    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
    Vonasi
    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.

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 Vonasi
5 years, 9 months ago.

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