- This topic has 1 reply, 2 voices, and was last updated 1 month ago by .
- You must be logged in to reply to this topic.
Can you please assist on the below. having few queries, I’m trying to script the below idea for backtesting but unable to put the Valid script.
1) I want to script criteria when “RSI Indicator Turns Up between Values 45 to 50“, Per below I’m able to put only 1 value. How can I put this in the script, please?
2) Please assist, how to create a script for Bollinger Band? The candle should close Higher B.B and Entry if the Next candle cross/moves High of the previous candle(which is 1st candle closed above Higher B.B.)
If you have not already done so please be sure to review and complete the free scripting courses here before attempting to build your own scripts. https://learn.optuma.com/scripting-courses/
For the RSI criteria you can use the following:
V1 = RSI() ;
//Check RSI value is between 45 - 50
V2 = V1 >= 45 and V1 <= 50;
//Check RSI Turns Up
V3 = V1 TurnsUp ;
//Check both criteria are met
V2 and V3
This will only show results where the RSI turns up while it is within a value of 45 – 50.
For Bollinger bands I am not 100% sure on the settings you are using, or if the current candles needs to Close higher than the high of the previous candle or the close? I’ve added a sample script below with comments on each line is doing, you can adjust it if need be.
//Set Bollinger Band Settings with Upper Line
V1 = BB(STDDEV=1.000000).UpperLine;
//Find where Close Crosses Above the BB Upper Line
V2 = CLOSE() CrossesAbove V1;
//Close is Higher than previous Candles High
V3 = CLOSE() > HIGH(1) ;
//After Closing above upper BB line is close higher than previous candles high
V2 == 1 and V3
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
|cname||14 days||This cookie is set by Optuma. The cookies is used to store the users campaign selection for selecting the correct version of Optuma to trial and is "Necessary".|
|cookielawinfo-checbox-analytics||11 months||This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".|
|cookielawinfo-checbox-functional||11 months||The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".|
|cookielawinfo-checbox-others||11 months||This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.|
|cookielawinfo-checkbox-necessary||11 months||This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".|
|cookielawinfo-checkbox-performance||11 months||This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".|
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.