Open orders only in core trading hours

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #11002 quote
    njames879
    Participant
    New

    Hi,

    I wonder if someone could help me?   I’ve set up a trading system that trades on the UK FTSE.   I trade with Pro Real time linked to a spread betting account with IG Index.   Now, one of the features of IG is that the spreads are wider outside of core trading hours,  (the FTSE, for example is 6 points before 8, and 1 point after 8).   My trading system works on a daily basis and so, as soon as the day rolls over after midnight, it places the order.  What’s the easiest way of getting the trading system to wait until a specific time (like 8:00am) before it checks the system criteria and places an order if they are met?

    Any help gratefully received.

    Nick

    #11003 quote
    Robert
    Participant
    Average

    Hi,

    simply use this:

    TRADE = time > 075900 AND time < 180100

    Then put “TRADE” into your Long- or Shortconditions.
    This would only allow your system to trade between 08:00 and 18:00.  🙂
    Hope this works for your purpose.

    Greetings,

    Robert

    #11005 quote
    Robert
    Participant
    Average

    Sorry, to be more exact: It would  allow your system to only TAKE trades.
    Open trades would remain overnight of course

    If you want to close all positions on a certain time (e.g. 18:00), you would have to insert “DEFPARAM FLATAFTER = 180000” at the first lines of code.

    #11006 quote
    njames879
    Participant
    New

    Perfect!  Thanks Robert.

     

    Nick

    #11007 quote
    njames879
    Participant
    New

    Hmm.   Sorry to be a nuisance, but I’ve just implemented this and, on backtest, I get zero entries.   I forgot to mention that I am trading on a daily timeframe.  How often does the automated trading system apply the test?  Does it, as I suspect, apply it once, at the beginning of the trading period for whatever period I have on the graph?  If so, that would explain it, as it will check once at 1 minute past midnight, and always fail the time test.

    Or am I completely wrong?
    Thanks,
    Nick

    #11008 quote
    Elsborgtrading
    Participant
    Veteran

    Hi Nick. The backtest apply the trade on the timechart you chose for the backtest, it initiate the trade when the conditions are true. Meaning whatever indicators you are using+ the Time limitation you put into the condition. if your backtest shows no result it either broke your account or none conditions were true- in that timeframe you chose. try set the units to 100000 using the (x)units on top of the chart, next to the time frame.

    cheers

    Kasper

    #162784 quote
    ptmrade
    Participant
    New

    Hi, any solution for this topic?

    The matter is to start a trade for a daily system in another hour than 00:00.

    Is it possible since the daily algorithm only checks at the daily close 00:00? I have already tried changing the “Activity hours” with no effect.

    Thanks.

    #162786 quote
    Vonasi
    Moderator
    Master

    Yes. There are no 075900 or 080000 or 080100 and so on candles on the daily time frame chart so you must use MTF in your strategy. You can then make decisions based on a daily timeframe and then execute them in a faster time frame such as the 1 minute time frame.

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

Open orders only in core trading hours


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
njames879 @njames879 Participant
Summary

This topic contains 7 replies,
has 2 voices, and was last updated by Vonasi
4 years, 12 months ago.

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