Re: Already Converted TradingView Indicators to MT4 Indicators

152
mrtools wrote: Fri Nov 04, 2022 3:45 am Not sure if will be able to translate, but for now do have this adaptive renko lines.
Thank you very much,sir. :D
I'd like to play around with it a little bit.

Mrs.W
At the back of a road in common use is another road in the mountain of flowers; you may take either way but be in time still in bloom.(Rikyu SEN)
人の行く裏に道あり花の山
いずれを行くも散らぬ間に行け (利休百首外から)

Re: Already Converted TradingView Indicators to MT4 Indicators

153
mrtools wrote: Fri Nov 04, 2022 3:45 am Renko Adaptive On Chart display indicator for MT4

Not sure if will be able to translate, but for now do have this adaptive renko lines.
Sick..... this is actually a live renko isn't it!!
Official Forex-station GIF animator at your service 👨‍⚖️
See a GIF with Forex-station.com on it? I probably made it
The best divergence indicator in the world.
Real news exists: Infowars.com 👈

Re: Already Converted TradingView Indicators to MT4 Indicators

154
Dear coders! Be so kind as to combine these three scripts into one as in the screenshot. For the TradingView platform. I placed one indicator on top of the other. Three in one - Scalper, trend, tick (impulse) Combine all the settings of three indicators into one indicator. The fact is that in the free version of TV you can install only three indicators, that is, you cannot install more than three. Thank you!

__TMO Scalper https://www.tradingview.com/script/LOPt ... O-Scalper/
_____________________________________________________________________________________________________________

Code: Select all

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
//
// @version=5
//
// TMO (T)rue (M)omentum (O)scillator) MTF Special Scapler Version
//
// TMO Scalper is a special custom version that was designed exclusively for lower time frame scalps (1-5min charts)
// 
// This version of the TMO Oscillator print the signals ONLY when the higher aggregation is aligned with the current (lower aggregation)
//
// Created by L&L Capital
// 

indicator("TMO Scalper", shorttitle="TMO Scalper", overlay=false) 

// Inputs

tmolength = input.int(14,title="Length")
calcLength = input(5, title="Calc Length")
smoothLength = input(3, title="Smooth Length")
dotsize = input(3, title="Signal Size")
offset = input(0,title="Signal Offset")

// TMO 1 Calculations

TimeFrame1 = input.timeframe('1', "TMO 1", options=['1','2','3','5','10','15','20','30','45',"60","120","180","240",'D','2D','3D','4D','W','2W','3W','M','2M','3M'])

srcc1 = request.security(syminfo.tickerid, TimeFrame1, close)
srco1 = request.security(syminfo.tickerid, TimeFrame1, open)
o1 =  srco1
c1 =  srcc1

data1 = 0
for i1 = 1 to tmolength -1
    if c1 > o1[i1]
        data1 := data1 + 1
    if c1 < o1[i1]
        data1 := data1 - 1


EMA1 = ta.ema(data1,calcLength)
Main1 = request.security(syminfo.tickerid, TimeFrame1, ta.ema(EMA1, smoothLength))
Signal1 = request.security(syminfo.tickerid, TimeFrame1, ta.ema(Main1, smoothLength))

// TMO 2 Calculations

TimeFrame2 = input.timeframe('5', "TMO 2", options=['1','2','3','5','10','15','20','30','45',"60","120","180","240",'D','2D','3D','4D','W','2W','3W','M','2M','3M'])

srcc2 = request.security(syminfo.tickerid, TimeFrame2, close)
srco2 = request.security(syminfo.tickerid, TimeFrame2, open)

o2 =  srco2
c2 =  srcc2

data2 = 0
for i2 = 1 to tmolength -1
    if c2 > o2[i2]
        data2 := data2 + 1
    if c2 < o2[i2]
        data2 := data2 - 1


EMA2 = ta.ema(data2,calcLength)
Main2 = request.security(syminfo.tickerid, TimeFrame2, ta.ema(EMA2, smoothLength))
Signal2 = request.security(syminfo.tickerid, TimeFrame2, ta.ema(Main2, smoothLength))

// TMO 3 Calculations

TimeFrame3 = input.timeframe('30', "TMO 3", options=['1','2','3','5','10','15','20','30','45',"60","120","180","240",'D','2D','3D','4D','W','2W','3W','M','2M','3M'])

srcc3 = request.security(syminfo.tickerid, TimeFrame3, close)
srco3 = request.security(syminfo.tickerid, TimeFrame3, open)

o3 =  srco3
c3 =  srcc3

data3 = 0
for i3 = 1 to tmolength -1
    if c3 > o3[i3]
        data3 := data3 + 1
    if c3 < o3[i3]
        data3 := data3 - 1


EMA3 = ta.ema(data3,calcLength)
Main3 = request.security(syminfo.tickerid, TimeFrame3, ta.ema(EMA3, smoothLength))
Signal3 = request.security(syminfo.tickerid, TimeFrame3, ta.ema(Main3, smoothLength))

// TMO Scalper Signals

mainln = (15*Main1/tmolength)
signaln = (15*Signal1/tmolength)
mainln2 = (15*Main2/tmolength)
signaln2 = (15*Signal2/tmolength)
mainln3 = (15*Main3/tmolength)
signaln3 = (15*Signal3/tmolength)

// TMO 1 Bullish Signal    
plot(ta.crossover(mainln, signaln) and (mainln2 > signaln2) ? (mainln-offset) : na, color = #0de50d ,title="TMO 1 Bullish Signal",style=plot.style_circles,linewidth = dotsize)

// TMO 1 Bearish Signal
plot(ta.crossover(signaln, mainln) and (mainln2 < signaln2) ? (mainln+offset) : na, color = #ff0000 ,title="TMO 1 Bearish Signal",style=plot.style_circles,linewidth = dotsize)

//TMO 2 Bullish Signal
plot(ta.crossover(mainln2, signaln2) and (mainln3 > signaln3) ? (mainln2-offset) : na, color = #006400 ,title="TMO 2 Bullish Signal",style=plot.style_circles,linewidth = dotsize+2,display=display.none)

//TMO 2 Bearish Signal
plot(ta.crossover(signaln2, mainln2) and (mainln3 < signaln3) ? (mainln2+offset) : na, color = #800000 ,title="TMO 2 Bearish Signal",style=plot.style_circles,linewidth = dotsize+2, display=display.none)

// TMO 1 Plots

color1 = Main1 > Signal1 ? #27c22e : #ff0000
mainLine1 = plot(15*Main1/tmolength, title="TMO 1 Main", color=color1)
signalLine1 = plot(15*Signal1/tmolength, title="TMO 1 Signal", color=color1)
fill(mainLine1, signalLine1, title="TMO 1 Fill", color=color1, transp=75)

// TMO 2 Plots

color2 = Main2 > Signal2 ? #27c22e : #ff0000
mainLine2 = plot(15*Main2/tmolength, title="TMO 2 Main", color=color2)
signalLine2 = plot(15*Signal2/tmolength, title="TMO 2 Signal", color=color2)
fill(mainLine2, signalLine2, title="TMO 2 Fill", color=color2, transp=75)

// TMO 3 Plots

color3 = Main3 > Signal3 ? #006400 : #800000
mainLine3 = plot(15*Main3/tmolength, title="TMO 3 Main", color=color3)
signalLine3 = plot(15*Signal3/tmolength, title="TMO 3 Signal", color=color3)
fill(mainLine3, signalLine3, title="TMO 3 Fill", color=color3, transp=75)

// Background & Colors

upper = hline(10, title="OB Line", color=#ff0000, linestyle=hline.style_solid,display=display.none)
lower = hline(-10, title="OS Line", color=#27c22e, linestyle=hline.style_solid,display=display.none)
ob = hline(math.round(15), title="OB Cutoff Line", color=#ff0000, linestyle=hline.style_solid)
os = hline(-math.round(15), title="OS Cutoff Line", color=#27c22e, linestyle=hline.style_solid)
zero = hline(0, title="Zero Line", color=#2a2e39, linestyle=hline.style_solid)
fill(ob, upper, title="OB Fill", color= #ff0000, transp = 75)
fill(os, lower, title="OS Fill", color= #27c22e, transp = 75)

_
_____________________________________________________________________________________________________

FVG - trend https://www.tradingview.com/script/VkMv ... ias-trend/

__________________________________________________________________________________________________________

Code: Select all

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © makuchaku

//@version=4
study("FVG Trend", overlay=false)

isUp(index) =>
    close[index] > open[index]
    
isDown(index) =>
    close[index] < open[index]


var fvgCounter = 0
bullishFvg = (close > high[1])
bearishFvg = (close < low[1])

if(bullishFvg)
    if(fvgCounter < 0) 
        fvgCounter := 0
    fvgCounter := fvgCounter + 1
if(bearishFvg)
    if(fvgCounter > 0) 
        fvgCounter := 0
    fvgCounter := fvgCounter - 1
    
plot(fvgCounter, color=(fvgCounter > 0 ? color.green : color.red), title="fvgCounter", linewidth=1)
bgcolor(fvgCounter > 0 ? color.green : color.red, transp=90)
plot(0, color=color.black) 
________________________________________________________________________________________________

Marsi https://www.tradingview.com/script/G2WR ... tyChicken/

____________________________________________________________________________________________________

Code: Select all

//Created by TheMightyChicken
//Based on Larry Connors RSI-2 Strategy - Lower RSI edited by ChrisMoody
study(title="Marsi Strategy [TheMightyChicken]", shorttitle="MarsiStrategy", overlay=false)
src = close, 
//RSI Code
up = rma(max(change(src),0),2)
down = rma(-min(change(src),0),2)
rsi = down==0 ? 100 : up==0 ? 0 : 100 - (100/(1+up/down))
//MA Code
ma5 = sma(close,5)
ma200= sma(close,200)
//Color Code
col = close>ma200 and close<ma5 and rsi<10 ? red : close<ma200 and close>ma5 and rsi>90 ? green : silver
//Graphics Code
line100 = plot(100, title="Upper Line 100",style=line, linewidth=1, color=silver)
line90 = plot(90, title="Lower Line 90",style=line, linewidth=1, color=silver)
line10 = plot(10, title="Upper Line 10",style=line, linewidth=1, color=silver)
line0 = plot(0, title="Lower Line 0",style=line, linewidth=1, color=silver)
fill(line90, line10, black, transp=95)
plot(rsi, title="RSI Line", style=line, linewidth=2,color=col)
plot(rsi, title="RSI Dots", style=circles, linewidth=3,color=col)
________________________________________________________________________________________
Attachments
Who knows others is wise
Who knows himself is enlightened

Re: Already Converted TradingView Indicators to MT4 Indicators

155
ionone wrote: Mon Jul 18, 2022 10:23 pm Andean Oscillator

found this oscillator yesterday, looked good.
converted it

you're welcome

screenshot.285.jpg

Code: Select all

// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
// © alexgrover

//Original post : Alpaca.markets/learn/andean-oscillator-a-new-technical-indicator-based-on-an-online-algorithm-for-trend-analysis/

//@version=5
indicator("Andean Oscillator")
//------------------------------------------------------------------------------
//Settings
//-----------------------------------------------------------------------------{
length     = input(50)

sig_length = input(9,'Signal Length')

//-----------------------------------------------------------------------------}
//Exponential Envelopes
//-----------------------------------------------------------------------------{
var alpha = 2/(length+1)

var up1 = 0.,var up2 = 0.
var dn1 = 0.,var dn2 = 0.

C = close
O = open

up1 := nz(math.max(C, O, up1[1] - (up1[1] - C) * alpha), C)
up2 := nz(math.max(C * C, O * O, up2[1] - (up2[1] - C * C) * alpha), C * C)

dn1 := nz(math.min(C, O, dn1[1] + (C - dn1[1]) * alpha), C)
dn2 := nz(math.min(C * C, O * O, dn2[1] + (C * C - dn2[1]) * alpha), C * C)

//Components
bull = math.sqrt(dn2 - dn1 * dn1)
bear = math.sqrt(up2 - up1 * up1)

signal = ta.ema(math.max(bull, bear), sig_length)

//-----------------------------------------------------------------------------}
//Plots
//-----------------------------------------------------------------------------{
plot(bull, 'Bullish Component', #089981)

plot(bear, 'Bearish Component', #f23645)

plot(signal, 'Signal', #ff9800)

//-----------------------------------------------------------------------------}
Dear moderators,

I have converted this indicator to MT5. I am happy to post it to the forum if not already done so. Just let me know the right place to post this to.


Re: Already Converted TradingView Indicators to MT4 Indicators

158
mrtools wrote: Tue Nov 01, 2022 2:53 pm Haven't figured out how to do it, actually wrote the code out on some notes, just trying to figure out how to put it together.

Not the neatest code yet, but it seems to do the trick:

And it has a bar overlay with button, so enjoy.


I have not yet tested all the features yet, so if you find a bug let me know.
These users thanked the author nwesterhuijs for the post (total 6):
sal, Knight, Chickenspicy, kvak, Jedidiah, RodrigoRT7


Who is online

Users browsing this forum: Amazon [Bot], Facebook [Crawler], Majestic-12 [Bot], mrtools, SijjiN and 98 guests