TTM Squeeze Oscillator and On price – ProOrder strategy
Forums › ProRealTime English forum › ProOrder support › TTM Squeeze Oscillator and On price – ProOrder strategy
- This topic has 7 replies, 1 voice, and was last updated 3 years ago by
idunnomuch.
-
-
05/17/2017 at 8:43 AM #35766
I want to automate a system to enter when the red dot goes to green, I cannot figure out how do do that using the assisted creation tool?
“if sColorR is superior to 0, the dot is red”
But sqz momentum = 0, (and the mkt is falling), yet the dot can be either red OR green and
if sqz momentum = -0 (and emphasis on minus here because you cannot have a -0.0 in assisted creation), it’s also red OR green (the mkt is rising), meaning I cannot figure out how to set up a conditionality:Enter long if
(i) the red dot squeeze turns to a green dot (and a breakout is imminent)
AND
(ii) the plus increase is > 0 (to signify a long position is to be taken).Exit Long if
Plus decrease bar occurs (as per John Carter’s strategy)Cheers
Bard05/17/2017 at 9:14 AM #35777The sColorR variable is not returned by the indicator, thus it cannot be used by the assisted creation tool, so first change the indicator RETURN line with this one: (I added the sColorR variable at the end of it)
1RETURN plusI coloured(colorR,colorG,colorB) style(histogram,1) as "plus increase", plusD coloured(colorR,colorG,colorB) style(histogram,1) as "plus decrease", minusI coloured(colorR,colorG,colorB) style(histogram,1) as "minus increase", minusD coloured(colorR,colorG,colorB) style(histogram,1) as "minus decrease", sqz coloured(scolorR,scolorG,0) style(point,5) as "squeeze momentum",scolorRThen you can automate the trigger of your orders by comparing the sColorR value from now to the previous period: (colour change of dot from green to red)
12345trigger = sColorR>0 and sColorR[1]=0if trigger then//BUY OR SELLSHORT !!endif1 user thanked author for this post.
05/17/2017 at 10:42 AM #3580405/18/2017 at 1:55 AM #35916Hi @Maz, I’ll take a look at Nicolas’s additional code and see if it can be auto traded as John Carter intended it to be used: https://www.youtube.com/watch?v=lbmUfauTGkU
05/20/2017 at 11:55 PM #36188Hi Nicolas,
Cheers for the Return and trigger code. The Return code has been added to the indicator.
When I code the trigger it’s telling me “sColourR is undefined?”I’m also thinking the TTM indicator code will need to be inserted into the auto trading code so as to be able to optimise the period (or eg the std dev value (mult)) to be then able to compare profits with a range of period (or std dev) values in Excel, to see if there is a robust range/set of values for period (or std dev).
Long side:
1234567891011121314151617trigger = sColorR>0 and sColorR[1]=0// Conditions to enter long positionsindicator1, ignored, ignored, ignored, ignored, ignored = CALL "TTM Squeeze on Price"c1 = (indicator1 > 0) ///plus increase > 0if trigger and C1 thenBUY 10 PERPOINT AT MARKETENDIF// Conditions to exit long positionsindicator3, indicator2, ignored, ignored, ignored, ignored = CALL "TTM Squeeze on Price"c2 = (indicator2 < indicator3) //plus decrease < plus increaseIF c2 THENSELL AT MARKETENDIFBest,
Bard
05/22/2017 at 8:47 AM #36254Yes because the sColorR is the variable name of the indicator, it is not in your strategy, you are calling the indicator but telling ProBacktest that it is “ignored” (it’s the 6th variable of your indi):
12345678910111213141516// Conditions to enter long positionsindicator1, indicator2, ignored, ignored, ignored, sColorR = CALL "TTM Squeeze on Price"c1 = (indicator1 > 0) ///plus increase > 0trigger = sColorR>0 and sColorR[1]=0if trigger and C1 thenBUY 10 PERPOINT AT MARKETENDIF// Conditions to exit long positionsc2 = (indicator2 < indicator1) //plus decrease < plus increaseIF c2 THENSELL AT MARKETENDIFNote that the sColorR could have been renamed with something else, it would have not mattered.
EDIT: it is not needed to “CALL” the same indicator twice.
05/22/2017 at 11:08 AM #36268Thanks for rearranging the code Nicolas!
Not sure why the code isn’t doing what John Carter intentioned it to do, eg for long trades:
Enter long if
(i) on a green dot after it changes from a red dot squeeze (red dots = and a breakout is imminent)
AND
(ii) the plus increase is > 0 (to signify a long position is to be taken).Exit Long if
Plus decrease bar occurs.Checked it on £/$ Daily 1997 – 2013, many squeezes that breakout with positive plus increase but trades aren’t taken?
Thanks again,
Bard12/26/2021 at 6:34 PM #183858Hi
Not sure if this is the best place to ask another question regarding this indicator or start a new thread.
I would like to also use this indicator to setup a trade.
However whenever I try and use the simplified creation tool it always says that it is only returning 5 values when it needs 6?
What is the reason for this?
Additionally I would like to understand how I can setup an action so it sells on market once a plus decrease bar (dark blue) on the histogram if i am long and to Close a Short when it turns to a minus increase bar (yellow).
Many thanks
-
AuthorPosts
Find exclusive trading pro-tools on