Exit next bar.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #26726 quote
    Gordon Gekko
    Participant
    Average

    Hi.

    Could i get help with the code for “exit position next bar, i.e exit after one bar.

    #26750 quote
    Wing
    Participant
    Veteran
    
    Sell at market
    
    If rsi[14]>70 then
    buy 1 lot at market
    endif
    #26771 quote
    Gordon Gekko
    Participant
    Average

    Thanks for reply.

    Sell at market makes it 0 bars i want one bar, buy at close if close is = to low. Sell at close next bar. enter at close of bar exit at close of next bar.

    #26810 quote
    Madrosat
    Participant
    Master

    Bonjour

    Ne serait ce que pour ne pas avoir de 0 bar dans les backtest ce serait pas mal!!    mais on attend??

    Madrosat

    #26821 quote
    Wing
    Participant
    Veteran

    See this previous thread. It has the code you need: https://www.prorealcode.com/topic/time-limit-2/

    Gordon Gekko thanked this post
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Exit next bar.


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by Wing
9 years ago.

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