TSI Strategy Automation
Forums › ProRealTime English forum › ProOrder support › TSI Strategy Automation
- This topic has 6 replies, 4 voices, and was last updated 5 years ago by
robertogozzi.
-
-
09/09/2019 at 10:31 AM #106921
Hello,
I require assistance please? I have basic strategy which I wish to automate but unfortunately the True Strength Indicator is “not available in ProBuilder language”. I have been using the the following code obtained from a previous forum:
1234a = (ExponentialAverage[13](ExponentialAverage[25](ROC[1](close))))b = (ExponentialAverage[13](ExponentialAverage[25](ABS(ROC[1](close)))))TSI = 100 * (a/b)Please will you assist with code for TSI(1) and TSI(2)?
This is my strategy:
123456789101112a = (ExponentialAverage[13](ExponentialAverage[25](ROC[1](close))))b = (ExponentialAverage[13](ExponentialAverage[25](ABS(ROC[1](close)))))TSI = 100 * (a/b)// Conditions to enter long positionsc1 = TSI < -20c2 = TSI > TSI(1) and TSI(1)>TSI(2)IF c1 and c2 THENBUY 1 lot AT MARKETENDIFThanks
09/09/2019 at 11:25 AM #106927> For clarity of messages on ProRealCode’s forums, please use the “insert code PRT” button to separate the text of the code part! Thank you! <<
At line 8 replace parenthesis with brackets to get TSI[1] & TSI[2].
1 user thanked author for this post.
09/09/2019 at 11:32 AM #10692904/22/2020 at 9:35 PM #12752404/22/2020 at 10:36 PM #127526Please use the ‘Insert PRT Code’ button when putting any code in your posts.
1a = (ExponentialAverage[13](ExponentialAverage[25](ROC[1](close))))defines what the value of ‘a’ is for every bar.
a[1] on its own will just return the value for ‘a’ one bar back from the last bar on the chart.
04/22/2020 at 11:27 PM #127527Thanks for your answer so a[1] should be this right?
123a = (ExponentialAverage[13](ExponentialAverage[25](ROC[1](close))))a[1] = (ExponentialAverage[13](ExponentialAverage[25](ROC[1](close[1]))))Thanks for your answer so a[1] should be this right?
I ask this because i want to find the close X such as
1(ExponentialAverage[13](ExponentialAverage[25](ROC[1](close[1]))))-(ExponentialAverage[13](ExponentialAverage[25](ROC[1](X))))=0Do you have a way to calculate that X?
04/23/2020 at 12:46 AM #127532You cannot assign a value to a past event.
a[1] is the result of an assignment occurred the previous candle and is read-only.
-
AuthorPosts
Find exclusive trading pro-tools on