Backtesting support — beginner– off hours

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #243016 quote
    BluemoonBluemoon
    Participant
    New

    All,

    I am  learning the basics, testing a simple MA crossover system (1 day period, checked at day close) .  The system seem to prefer placing orders at 12 am. If I restrict trading  to regular hours (e.g. 10 am to 4 pm), no orders are executed. Is that because technically the next period technically would’ve started and the system is getting confused? Is there a way around?

    Thank you so much.

    orders.png orders.png
    #243027 quote
    JSJS
    Participant
    Master

    When you use a 1-day timeframe, the day ends and a new one begins at midnight…

    Your code is executed at the end of the bar/day/close, so your order is placed at the “Open” of the new day (12:00 am)…

    If you want to trade during the day, you need to use “Intraday” timeframes, such as 1 hour, 5 minutes, or 1 second, and so on…

    #243028 quote
    BluemoonBluemoon
    Participant
    New
    Thank you so much
    JS thanked this post
Viewing 3 posts - 1 through 3 (of 3 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

Backtesting support — beginner– off hours


General Trading: Market Analysis & Manual Trading

New Reply
Author
author-avatar
Bluemoon @bluemoon Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by BluemoonBluemoon
1 year, 7 months ago.

Topic Details
Forum: General Trading: Market Analysis & Manual Trading
Language: English
Started: 01/23/2025
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...