Breakout DAX 15 min
Forums › ProRealTime English forum › ProOrder support › Breakout DAX 15 min
- This topic has 9 replies, 4 voices, and was last updated 7 years ago by Raul Vg.
-
-
02/07/2017 at 5:36 PM #24247
Hi, I need help, I’m working on a robot, the one I copy next. It is the break in the dax of the first 15 minutes of the day. But I need you not to be continuously buying and selling, I only try 2 times a day, once in purchase and another one for sale if the price touches. how can I do it? thank you
12345678910111213141516171819202122232425262728293031323334Defparam cumulateorders = falseDefparam flatafter = 171500n=1// nos quedamos a las 9.15 con el maximo y minimo de 1 vela antes, es decir, la vela de 9 a 9.15, calculamos la amplitud de esa velaIF Time = 091500 THENmaximo = highest[1](high)minimo = lowest[1](low)compra = 1venta = 1ENDIFif Time > 091500 AND Time <= 171500 THENIF compra = 1 THENbuy n contracts at maximo stopENDIFIF venta = 1 THENsellshort n contracts at minimo stopENDIFENDIFIf longonmarket THENcompra = 0ENDIFIF shortonmarket THENventa = 0ENDIFset stop ploss 10set target pprofit 1502/07/2017 at 7:32 PM #2426102/07/2017 at 8:17 PM #24268If it works, it works. But what happens is that he spends all day doing operations. And I want you to only put one to buy and one to sell at the most. Although the condition is returned, if it has already bought once, do not buy again that day.
02/08/2017 at 8:50 AM #24286When using pending orders, they can trigger anytime between 2 bars at the price level we put them on. So, we never know when they are executed, and if they last only 0 bar (open and close inside the bar), there is no way to know we were on market inside this bar, that’s why you have a lot of trades because your ‘compra’ and ‘venta’ variables will never be set to 1.
02/08/2017 at 2:57 PM #2435202/08/2017 at 3:01 PM #2435402/08/2017 at 4:12 PM #24376Hello, I already tried it, but when you change the stop by 10 and put a take of 10, it happens again, spend the day getting operations, I want you to schedule a purchase operation at the maximum and a sale in The minimum and that throughout the day if the price touches it will execute one or both. And not to continue scheduling all day orders.
02/09/2017 at 7:20 PM #2454302/09/2017 at 7:38 PM #245441234567891011121314151617181920212223242526272829303132333435363738394041424344454647DEFPARAM CUMULATEORDERS = falseDEFPARAM FLATBEFORE = 080000DEFPARAM FLATAFTER = 171500Position = 1if intradaybarindex=0 thencount = 0lastindex = 0endifIF Time = 081000 THENhaut = highest[2](high)bas = lowest[2](low)amplitude = haut - basENDIFIF TIME > 081000 AND TIME <= 170000 THEN//Conditions pour ouvrir une position acheteuseIF your conditionsTHENBUY Position contracts at haut stopENDIFIf longonmarket AND TRADEINDEX<>lastindex THENCOUNT = COUNT+1Lastindex = TRADEINDEXENDIF//Conditions pour ouvrir une position vendeuseIF yourconditionsTHENSELLSHORT Position contracts at bas stopENDIFIF shortonmarket AND TRADEINDEX<>lastindex THENCOUNT = COUNT+1Lastindex = TRADEINDEXENDIF//stops et ObjectifsSET STOP LOSS 31SET TARGET PROFIT 23ENDIFif you want to have one sell and one buy
if INTRADAYBARINDEX =0 THEN
COUNTBUY =0
COUNTSELL =0
LASTINDEX = 0
ENDIF
etc etc etc
02/09/2017 at 7:42 PM #24545 -
AuthorPosts
Find exclusive trading pro-tools on