Multitimeframe Order Exit

Forums ProRealTime English forum ProOrder support Multitimeframe Order Exit

Viewing 15 posts - 1 through 15 (of 20 total)
  • #177989

    Hey guys!

    I just made some multitimeframe systems and I want them to exit the trade at the open of the next bar in the bigger timeframe.

    Can you help me out?

     

    For Example:

    timeframe (5 minutes)

    // Bedingungen zum Triggern von Long-Positionen
    indicator1 = xxx
    c1 = (close < indicator1)

    // Bedingungen zum Triggern von Short-Positionen
    indicator3 = xxxx
    c3 = (close > indicator3)

     

    //Bedingugngen zum Einstieg in Long-/Shortpostitionen
    timeframe (10 seconds)
    if not longonmarket and c1 then
    buy 1 contract at indicator1 stop
    endif

    if not shortonmarket and c3 then
    sellshort 1 contract at indicator3 stop
    endif

    // GET OUT RULES??????

    Exit trade when a new candle opens in TF 5   ( WHAT IS THE CODE FOR THAT)

     

     

     

    THank you!

    #177990

    I tried this:

     

    IF BarIndex – TradeIndex = x Then
    Sell at Market
    ExitShort at Market

     

    But if I write it under timeframe (5 Minutes) it doesnt exit anyway.

    If i write it under timeframe (10 seconds) it exits after a specific amount of bars, but not at the open of the new candle in the 5 min tf.

    #177992

    You need to use below …

     

    #177995

    what will that change for the closing of my order?

     

    this just delays my entry…..

    #177996

    See if attached does what you want it to ?

    I used 1 min (in place of 5 min) because 1 min produced more trades.

     

    #178000

    my problem is no the buying or how much trades the system produces. — I am opening orders in the 10 second timeframe,

     

    My proplem are the exits. —  I want to exit in the 5 minute timeframe.

     

     

    No matter when my trade is opened, i want to end it as soon as the next 5 minute bar opens.

    #178001

    the code must be something like:

    for longpositions:

    if longonmarket then sell next bar at open in timeframe (5 minutes)

    for shortpositions:

    if shortonmarket then exitshort next bar at open in timeframe (5 minutes) 

    #178004

    Strategies are only executed when a bar closes. At that time you will be able to open or close any trade, no choice.

    To be able to close, in a 5-minute TF, when the, say, 080000 candle opens, you need to place the exit order when the 075500 candle closes.

    Another solution could be to use a 1-second TF so that you close the trade at the closing of the 080000 1-second TF, that is at 080001.

     

    #178019

    I know. I think you dont understand me.

     

    My system is buying in the 10 second chart when a buysignal is given in the 5 min chart.

    And my problem is: I want the system to sell when a new candle is opened in the 5 min chart. And i dont have the code for that.

    #178025

    I need the code for:

     

    timeframe (5 minutes)

    EXIT = ………………………………           <————– what is the condition to sell next bar at open in the 5 minute timeframe?

     

    timeframe (10 seconds)

    If longonmarket and EXIT then
    sell at market
    endif

    If shortonmarket and EXIT then
    exitshort at market
    endif

    #178031

    To exit when a candle opens you have to exit when the previous bar closes.

    To exit at 080000 you have to exit at the closing of the 075500 candle.

    in the 5-minute TF (in the 10-second TF you should use 075550).

    #178034

    But i dont know when my system is opening a trade.. so how should i know the exact time when to close it?

     

     

    #178038

    I want the system to be flat, everytime a new candle opens in the t5 minute time frame.

    #178043

    That’s easy, just exit as the beginning of your code. It will ALWAYS close any open trade:

    there’s no need to check if already OnMarket, as if it’s not the two instructions are ignored. And if you are in a Long position EXITSHORT will be ignored (and the opposite for SELL).

    1 user thanked author for this post.
    #178044

    THANK YOU!

     

    Thats what i was looking for, thank you VERY MUCH!!!!!!

Viewing 15 posts - 1 through 15 (of 20 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login