Placing another order 10 points higher or lower
Forums › ProRealTime English forum › ProRealTime platform support › Placing another order 10 points higher or lower
- This topic has 7 replies, 4 voices, and was last updated 8 years ago by absent1980.
-
-
05/30/2016 at 8:32 PM #8426
Hi,
Just following on from my last post & would be grateful for any input possible.
I am using a 1 min chart which if a condition is met a Long / Short is action.
What I would like to do is it to wait 2 min (for example) and then carry out a second trade (accumulate).
(What I am trying to control here is a signal that holds for 5 minutes and as a consequence – 5 separate trades are initiated all
more or less at the same price)
Or
If the price moves 10 further points carry out another trade.
Thanks you in advance for any help you can suggest.
Regards
BH
05/30/2016 at 8:58 PM #8439Hi, for your first needs, you can use TRADEINDEX which gives you the quantity of elapsed bars since when the last trade opened.
For your next request, I’ll answer in the other topic 🙂
05/30/2016 at 9:19 PM #8445Would you not have to use ‘Barindex – TradeIndex’ in order to get quantity of elapsed bars since when the last trade opened? Or am I confused again?
I know you know this Nicolas as it will be ‘2nd nature to you’ and a bit like asking you … how do you breathe! ha
Apologies for my British humour
GraHal
05/30/2016 at 10:54 PM #8452Hi,
I think I’ve managed to sort it – I’ve arrived at the following code
12345678IF c1 AND NOT LongOnMarket THENBUY 2 PERPOINT AT MARKETENDIF//let's add another order taken with a condition of 10 bars elapsed since the first oneIF BARINDEX-TRADEINDEX(1)>10 AND C1 THENBUY 2 PERPOINT AT MARKETENDIFThis stops the accumulation of orders one minute to the next – but actioned the second Long – which is what I wanted to try and achieve.
I’ll continue to check for variatons on this and let you know if I come up with any variants.
Regards
Hugh
05/31/2016 at 9:25 AM #848405/31/2016 at 10:33 PM #8554Hi the Hug
12345<span class="token keyword">IF</span> <span class="token keyword">BARINDEX</span><span class="token operator">-</span><span class="token keyword">TRADEINDEX</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token punctuation">)</span><span class="token operator">></span><span class="token number">10</span></code> means ... If the number of bars in the 'previous Trade' > 10.Is this what you want?Or do you want123456<span class="token keyword">IF</span> <span class="token keyword">BARINDEX</span><span class="token operator">-</span><span class="token keyword">TRADEINDEX </span><span class="token operator">></span><span class="token number">10 means ... If the number of bars in the 'current trade' > 10?CheersGraHal</span>06/01/2016 at 12:18 AM #855706/29/2016 at 11:11 PM #10007Hi Guys,
Can anyone advise on how to code buy order and at the same time to add several market orders to fill if price goes up?
Thank you.
-
AuthorPosts
Find exclusive trading pro-tools on