How to activate BUY/SELL at specific pivot point?
Forums › ProRealTime English forum › ProOrder support › How to activate BUY/SELL at specific pivot point?
- This topic has 9 replies, 3 voices, and was last updated 6 years ago by Nicolas.
Tagged: limit, pivot points
-
-
10/16/2018 at 9:49 PM #82929
Me again guys,
Im looking for a very simple code to get me started understanding coding, and the language.
To get me started, all I am after is a small code that BUYS (target 10 pips, stop 10 pips) when it comes DOWN from above and hits the daily pivot S1.
I will be needing one that SELLS when it comes UP and touches the daily pivot R1 too, but Im hoping to do that one myself using the above code that I will hopefully get from you guys.
Thanks guys
10/18/2018 at 7:57 AM #83047The codes found in the topic below should give you some hints on how to make it:
Automated trading with Pivot Points and Dojis
Basic pivot point intraday trading strategy
etc.
Just ask if you are still in trouble to get things working! 🙂
10/18/2018 at 11:30 AM #83073Thanks mate, but Im still struggling.
The codes are full of language that I dont understand. 🙁 This is why I was wanting some sort of newbies course that teaches you the basics. I have tried taking an existing code and altering it, but I have no idea what anything means.
Everything seems to be crosses over, or crosses under!? All I require at the moment is how to write a code to trigger a BUY if the price hits a specific pivot point (lets say S2 for example).
What would a basic code like this look like?
Thanks guys
10/18/2018 at 12:55 PM #83089The below code is a basic strategy, since you want to sellshort a price level that is above the current close, you need to set a pending LIMIT order at this price level:
1234567891011121314151617defparam cumulateorders=falseHt = DHigh(1)Bs = DLow(1)C = DClose(1)Pivot = (Ht + Bs + C) / 3//Res3 = Res1 + (Ht - Bs)Res2 = Pivot + Ht - Bs//Res1 = (2 * Pivot) - Bs//Sup1 = (2 * Pivot) - Ht//Sup2 = Pivot - (Ht - Bs)//Sup3 = Sup1 - (Ht - Bs)if not onmarket and close<res2 thensellshort at Res2 limitendif10/18/2018 at 1:29 PM #83098Ok thanks, so I presume the first half of the code is programming in the pivot R2?
But I’m just a little confused at the second part. What does the “onmarket” mean?
Also, when you say I need to set a limit order, does the code do that for me? Or does it need to be set manually?
Thanks again
10/18/2018 at 2:58 PM #8310910/18/2018 at 7:20 PM #8314010/18/2018 at 7:28 PM #8314210/18/2018 at 9:15 PM #83147A lot of answers can be found here:
https://www.prorealcode.com/prorealtime-documentation/
Also if you use the search box that appears if you click on the down arrow next to your avatar in the top right corner you will find that a lot of the questions you may want to ask have already been answered before – it can sometimes be much faster than waiting for an answer!
10/19/2018 at 8:06 AM #83159how do I set the amount per point and the stop? Also, how would you set the limit order to be like 2 or 3 pips BEFORE the R2?
1sellshort 1 contract at Res2-2*pointsize limitA sellshort pending order of 1 contract, is set 2 points below the Res2 price level.
-
AuthorPosts
Find exclusive trading pro-tools on