Multitimeframe Order Exit
Forums › ProRealTime English forum › ProOrder support › Multitimeframe Order Exit
- This topic has 19 replies, 3 voices, and was last updated 4 years ago by
Amr600.
-
-
09/20/2021 at 6:58 PM #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
endifif 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!
09/20/2021 at 7:17 PM #177990I tried this:
IF BarIndex – TradeIndex = x Then
Sell at Market
ExitShort at MarketBut 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.
09/20/2021 at 7:38 PM #17799209/20/2021 at 8:00 PM #17799509/20/2021 at 8:14 PM #17799609/20/2021 at 8:31 PM #178000my 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.
09/20/2021 at 8:35 PM #17800109/20/2021 at 9:09 PM #178004Strategies 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.
09/21/2021 at 7:57 AM #178019I 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.
09/21/2021 at 8:09 AM #178025I 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
endifIf shortonmarket and EXIT then
exitshort at market
endif09/21/2021 at 8:16 AM #178031To 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.
123IF Time = 080000 THEN// exit hereENDIFin the 5-minute TF (in the 10-second TF you should use 075550).
09/21/2021 at 8:27 AM #17803409/21/2021 at 8:36 AM #17803809/21/2021 at 8:43 AM #178043That’s easy, just exit as the beginning of your code. It will ALWAYS close any open trade:
123Timeframe (5 minutes, updateonclose)SELL AT MarketEXITSHORT AT Marketthere’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.
09/21/2021 at 8:47 AM #178044 -
AuthorPosts
Find exclusive trading pro-tools on