trading on two time lines

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #107106 quote
    Bob HarrisBob Harris
    Participant
    Average

    Hi all

     

    I wonder if you could help me

    I have a set up based on the 4 hour candles, but if i have not hit my target or my stop after 1 hour i want to close the position,

    if i use the ‘flat after’ command it only works when the next candle starts

    i am assuming i can use a second system with a different candle time to generate a close order but i cant get my head around the code

    any help would be much appreciated

    Thanks

    #107113 quote
    VonasiVonasi
    Moderator
    Master

    Just using MTF with UPDATEONCLOSE on the four hour time frame will open a trade at the close of a four hour bar and then just close it in the 1 hour time frame.

    timeframe (4 hours, updateonclose)
    if (your entry conditions) then
    buy 1 contract at market
    endif
    
    timeframe(1 hour)
    if onmarket then
    sell at market
    endif
Viewing 2 posts - 1 through 2 (of 2 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

trading on two time lines


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Bob Harris @bob_harris Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by VonasiVonasi
7 years ago.

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