RSI, Stochastic and Ichi Pine code strategy conversion request.
Forums › ProRealTime English forum › ProOrder support › RSI, Stochastic and Ichi Pine code strategy conversion request.
- This topic has 13 replies, 6 voices, and was last updated 3 years ago by Vonasi.
-
-
04/16/2020 at 6:44 PM #126443
Hi,
I need help to modify a PRT code from pine.
(I use it on dax3m and get 70%+ results on backtest)
If you have a beter alternative/TWEAK to get better results your free to change it. Please take your time and check. Code is posted below. And I hope i´ve posted this in the right forum because im new on this site.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364//@version=4strategy(“My Strategy”, overlay=true)sourceInput = input(close)emaLengthInput = input(defval=62, title=”EMA Length”, type=input.integer)rsiInput = input(defval=14, title=”RSI Length”, type=input.integer)// stochstochLengthInput = input(defval=14, title=”Stoch Length”, type=input.integer)stochFastInput = input(defval=3, title=”Stoch Fast”, type=input.integer)stochSlowInput = input(defval=3, title=”Stoch Slow”, type=input.integer)stochBuySignalInput = input(defval=20, title=”Stoch Buy Signal Input”, type=input.integer)stochSellSignalInput = input(defval=80, title=”Stoch Sell Signal Input”, type=input.integer)// rsirsi = rsi(sourceInput, rsiInput)// ichitenkanPeriods = input(9, minval=1, title=”Tenkan-sen period”)kijunPeriods = input(26, minval=1, title=”Kijun-sen period”)senkouSpanBPeriods = input(52, minval=1, title=”SenkouSpanB period”)chikouDisplacement = input(26, minval=1, title=”Chikou displacement”)// calcsema = ema(sourceInput, emaLengthInput)stoch = stoch(close, high, low, stochLengthInput)stochFast = sma(stoch, stochFastInput)stochSlow = sma(stochFast, stochSlowInput)donchian(len) => avg(lowest(len), highest(len))tenkan = donchian(tenkanPeriods)kijun = donchian(kijunPeriods)senkouA = avg(tenkan, kijun)senkouB = donchian(senkouSpanBPeriods)chikou = sourceInputplot(chikou, offset= -chikouDisplacement + 1, color=#000000)buySignal = false// sellstochSellSignal = stochFast > stochSellSignalInput and crossunder(stochFast, stochSlow)rsiSignal = change(rsi) < 0ichiSellSignal = chikou < sourceInput[chikouDisplacement-1]sellSignal = stochSellSignal and rsiSignal and ichiSellSignalshortProfitPerc = input(title=”Short Take Profit (%)”, minval=0.0, step=0.1, defval=0.5) / 100shortLossPerc = input(title=”Short Stop Loss (%)”, minval=0.0, step=0.1, defval=0.5) / 100if(sellSignal)strategy.entry(“Short”, long=false)if (strategy.position_size < 0)shortExitPrice = strategy.position_avg_price * (1 – shortProfitPerc)shortStopPrice = strategy.position_avg_price * (1 + shortLossPerc)strategy.exit(id=”XS CloseShort”, limit=shortExitPrice, stop=shortStopPrice)if hour == 17 and minute == 28strategy.close_all()plot(kijun, color=color.new(color.red, 0))plot(ema, color=color.new(color.blue, 0))barcolor(buySignal ? color.new(color.blue, 0) : sellSignal ? color.new(color.red, 0) : na)04/16/2020 at 6:54 PM #126444Now you posted it correctly. I deleted the wrong one in ProBuilder support.
To ask for free conversions you should follow this link https://www.prorealcode.com/free-code-conversion/
describing the strategy as much as possible, preferably attaching some screenshots.
1 user thanked author for this post.
04/16/2020 at 9:36 PM #126455Welcome to the forums. You have managed to break four of the simple forum rules with your very first topic and you broke one of them twice! I’ll check with the Guinness book of records as we might be able to get your name in their book.
There are some simple rules that everyone using the forums is expected to follow.
The forum rules are as follows. I have highlighted in bold the rule/rules that you have not followed:
Post your topic in the correct forum.
ProRealTime Platform Support only platform related issues.
ProOrder only strategy topics.
ProBuilder only indicator topics.
ProScreener only screener topics
General Discussion any other topics.
Welcome New Members for new forum members to introduce themselves.Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.
Always use the ‘Insert PRT Code’ button when putting code in your posts to make it easier for others to read.
Do not double post. Ask your question only once and only in one forum. All double posts will be deleted anyway so posting the same question multiple times will just be wasting your own time and will not get you an answer any quicker. Double posting just creates confusion in the forums.
Be careful when quoting others in your posts. Only use the quote option when you need to highlight a particular bit of text that you are referring to or to highlight that you are replying to a particular member if there are several involved in a conversation. Do not include large amounts of code in your quotes. Just highlight the text you want to quote and then click on ‘Quote’.
Give your topic a meaningful title. Describe your question or your subject in your title. Do not use meaningless titles such as ‘Coding Help Needed’.
Do not include personal information such as email addresses or telephone numbers in your posts. If you would like to contact another forum member directly outside of the forums then contact the forums administrator via ‘Contact Us’ and they will pass your details on to the member that you wish to contact.
Always be polite and courteous to others.
Have fun.I have edited your post where required. Please ensure that your future posts meet these few simple forum rules. 🙂
04/17/2020 at 6:22 AM #126463The code don t run (have a look ti the picture attached). see you soon.
04/17/2020 at 6:53 AM #126465The code don t run (have a look ti the picture attached). see you soon.
It’s not a PRT code…..
04/17/2020 at 7:43 AM #126466Yeah its not a prt code. I need help to make it a PRT from pine.
04/17/2020 at 11:12 AM #126501Also if you solve this. Please mail me at *****
04/17/2020 at 12:14 PM #126528Another rule is:
- Do not include personal information such as email addresses or telephone numbers in your posts.
If you want to get updated on each new post of a topic, please subscribe (button is at the top right of each page).
1 user thanked author for this post.
04/29/2020 at 8:49 AM #128765Nicolas can you please remove this post from the forum?
04/29/2020 at 9:10 AM #12877104/29/2020 at 1:40 PM #128820Well I havent got any help yet and seems like noone wants to help.
04/29/2020 at 3:09 PM #12884105/03/2020 at 9:03 AM #129519By trying to learn i´ve came this far and acctually hard troubleshooting when im new. Hopefully someone could help with this.
1234567891011121314151617181920212223242526272829303132333435363738394041424344// Conditions to enter short positionsIF NOT ShortOnMarket AND YourConditions THENSELLSHORT 1 CONTRACTS AT MARKETENDIF// Conditions to exit short positionsIF ShortOnMarket AND YourConditions THENEXITSHORT AT MARKETENDIF// Stops and targets : Enter your protection stops and profit targets here// stochstochLengthInput = input(defval=14, title="Stoch Length", type=input.integer)stochFastInput = input(defval=3, title="Stoch Fast", type=input.integer)stochSlowInput = input(defval=3, title="Stoch Slow", type=input.integer)stochSellSignalInput = input(defval=80, title="Stoch Sell Signal Input", type=input.integer)// rsirsi = rsi(sourceInput, rsiInput)// ichitenkanPeriods = input(9, minval=1, title="Tenkan-sen period")kijunPeriods = input(26, minval=1, title="Kijun-sen period")senkouSpanBPeriods = input(52, minval=1, title="SenkouSpanB period")chikouDisplacement = input(26, minval=1, title="Chikou displacement")// shortstochSellSignal = stochFast > stochSellSignalInput and crossunder(stochFast, stochSlow)rsiSignal = change(rsi) < 0ichiSellSignal = chikou < sourceInput[chikouDisplacement-1]sellSignal = stochSellSignal and rsiSignal and ichiSellSignalshortProfitPerc = input(title="Short Take Profit (%)", minval=0.0, step=0.1, defval=0.5) / 100shortLossPerc = input(title="Short Stop Loss (%)", minval=0.0, step=0.1, defval=0.5) / 100if(sellSignal)strategy.entry("Short", long=false)if (strategy.position_size < 0)shortExitPrice = strategy.position_avg_price * (1 - shortProfitPerc)shortStopPrice = strategy.position_avg_price * (1 + shortLossPerc)strategy.exit(id="XS CloseShort", limit=shortExitPrice, stop=shortStopPrice)05/03/2020 at 9:18 AM #129523Another post from you and another forum rule broken. Use the ‘Insert PRT Code’ button!
As you claim that this constant disregard for the few simple rules is due to your poor English I have created some pictures for you.
I have once again wasted my own time tidying up your posts.
-
AuthorPosts
Find exclusive trading pro-tools on