sell same bar close

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #87831 quote
    ullle73
    Participant
    Senior

    is it possible to sell at todays bar close? since backtesting can be made in tick mode?

     

    If so, could someone help me with this code:

     

    price must be above close 30 days ago

    close must be lower than close 9 days ago

    buy and next bar open and sell on bar close..

    #87832 quote
    Vonasi
    Moderator
    Master

    It is not possible to sell at the close of any bar as all orders go to market at the open of the bar after the decision bar. The closest you could get is to use MTF on a 1 second timeframe and sell at open of the final second of a day. MTF is not currently possible in real live trading. Also using 1 second charts seriously limits amount of back test data available for testing. It is also not possible to live trade algos on tick charts – backtesting is possible but not real live trading.

    #87842 quote
    ullle73
    Participant
    Senior

    It is not possible to sell at the close of any bar as all orders go to market at the open of the bar after the decision bar. The closest you could get is to use MTF on a 1 second timeframe and sell at open of the final second of a day. MTF is not currently possible in real live trading. Also using 1 second charts seriously limits amount of back test data available for testing. It is also not possible to live trade algos on tick charts – backtesting is possible but not real live trading.

    okay, thanks for answering. I would be fine buying 9.00 and selling 17,25 on 5min chart.

     

    Would you be able to help me with the code?

    #87943 quote
    Nicolas
    Keymaster
    Master

    Mean reverting strategy?

    Here is the code built with MTF capability (you’ll not able to use it until the public release of it)

    defparam cumulateorders=false
    
    TIMEFRAME (daily,updateonclose)
    close30=close[30]
    close9=close[9]
    
    TIMEFRAME (5 minute,updateonclose)
    condition = close>close30 and close<close9 and time=090000
    if not onmarket and condition  then 
    buy at market
    endif
    if longonmarket and time=172500 then 
    sell at market 
    endif 
    
    graph close30
    graph close9 coloured(200,0,0)
    graph close
    //graph condition
    ullle73 thanked this post
    #88047 quote
    ullle73
    Participant
    Senior

    Mean reverting strategy?

    Here is the code built with MTF capability (you’ll not able to use it until the public release of it)

    thank you very much nicolas 🙂

    #115595 quote
    icharttop
    Participant
    Junior

    So that means we can not us coding to Buy or Sell on Automatic trading only backtesting

    #115600 quote
    Vonasi
    Moderator
    Master

    So that means we can not us coding to Buy or Sell on Automatic trading only backtesting

    You can use code via ProOrder to Buy and Sell using automatic trading.

    Multi Time Frame (MTF) trading was introduced a long time ago now and there were some teething problems at the beginning and for a while it was only available by request. The posts in this topic are from a year ago.

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

sell same bar close


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
ullle73 @jonas_rydqvist Participant
Summary

This topic contains 6 replies,
has 4 voices, and was last updated by Vonasi
6 years, 1 month ago.

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