trading on two time lines

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #107106 quote
    Bob 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
    Vonasi
    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.

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 Vonasi
6 years, 5 months ago.

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