Re: Already Converted TradingView Indicators to MT4 Indicators

501
mrtools wrote: Wed Nov 27, 2024 7:52 am Hello, wouldn't that be the same or similar to Mladen's atr probability?
Good afternoon Mr Tools, how are you?

Can you convert this code please? if possible with MTF?//+------------------------------------------------------------------+
//| ATR Grid Indicator from Daily |
//+------------------------------------------------------------------+
#property indicator_chart_window
#property indicator_buffers 6
#property indicator_color1 Red
#property indicator_color2 Orange
#property indicator_color3 Yellow
#property indicator_color4 Yellow
#property indicator_color5 Orange
#property indicator_color6 Red
#property indicator_width1 1
#property indicator_width2 1
#property indicator_width3 1
#property indicator_width4 1
#property indicator_width5 1
#property indicator_width6 1

//--- Input parameters
input int daily_atr_len = 15;
double lvl1 = 0.5;
double lvl2 = 0.7;

//--- Buffers for storing ATR values
double Buffer1[];
double Buffer2[];
double Buffer3[];
double Buffer4[];
double Buffer5[];
double Buffer6[];

int OnInit()
{
SetIndexBuffer(0, Buffer1, INDICATOR_DATA);
SetIndexBuffer(1, Buffer2, INDICATOR_DATA);
SetIndexBuffer(2, Buffer3, INDICATOR_DATA);
SetIndexBuffer(3, Buffer4, INDICATOR_DATA);
SetIndexBuffer(4, Buffer5, INDICATOR_DATA);
SetIndexBuffer(5, Buffer6, INDICATOR_DATA);

SetIndexStyle(0, DRAW_LINE);
SetIndexStyle(1, DRAW_LINE);
SetIndexStyle(2, DRAW_LINE);
SetIndexStyle(3, DRAW_LINE);
SetIndexStyle(4, DRAW_LINE);
SetIndexStyle(5, DRAW_LINE);

IndicatorShortName("ATR Grid from Daily");
return(INIT_SUCCEEDED);
}

int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
int limit;
if(prev_calculated == 0)
limit = rates_total - daily_atr_len;
else
limit = rates_total - prev_calculated;

// Daily ATR calculation
for(int i = limit; i >= 0; i--)
{
double dailyATR = iATR(NULL, PERIOD_D1, daily_atr_len, i);
double dailyClose = iClose(NULL, PERIOD_D1, i);

Buffer1[i] = dailyClose + dailyATR;
Buffer2[i] = dailyClose + dailyATR * lvl2;
Buffer3[i] = dailyClose + dailyATR * lvl1;
Buffer4[i] = dailyClose - dailyATR * lvl1;
Buffer5[i] = dailyClose - dailyATR * lvl2;
Buffer6[i] = dailyClose - dailyATR;
}

return(rates_total);
}


I believe it will be of great value for measuring Take Profit and OBOS situations using the ATR. Shouts to Master XARD

In fact, I think it's a similar request to this one. post1295528866.html#p1295528866

Thank you very much again :D


Re: Already Converted TradingView Indicators to MT4 Indicators

502
Cagliostro wrote: Tue Nov 12, 2024 7:07 pm Market Structure Oscillator

The Market Structure Oscillator indicator looks at changes in market structure over different time frames, including short-term, intermediate-term, and long-term. It shows this information as oscillators and graphs on the main price chart, making it easier to see what's happening in real-time.

By presenting the market structures as oscillators, traders can better understand the momentum and strength of trends. This helps them spot possible trend reversals and offers new insights to improve their analysis of traditional market structures.

The on-chart structures are labelled as:
  • Breaks of Structure (BoS) which signifies the continuation of the existing market trend
  • Change of Character (CHoCH) suggests a potential shift in market sentiment or direction
The indicator analyzes price patterns using a price action methodology and identifies market structures across various timeframes. The data is then normalized and weighted to produce the final value of the Market Structure Oscillator.

Here you go. It was easy to check on Lux Algo website.
Am I the only one that I am not getting the same "volume candles" or is there an error in coding? It shows me this low volume candles on mt4 compared to tw. GPBUSD 15min

Re: Already Converted TradingView Indicators to MT4 Indicators

503
Dego wrote: Sat Nov 30, 2024 10:08 am Am I the only one that I am not getting the same "volume candles" or is there an error in coding? It shows me this low volume candles on mt4 compared to tw. GPBUSD 15min
MT4 and TV have different data streams, even when they refer to the same instrument and broker.
"I conjure from shadows and shape fortunes from the unseen. The treasure lies hidden in plain sight, beneath the sunlight." - Cagliostro


Re: Already Converted TradingView Indicators to MT4 Indicators

506
Cagliostro wrote: Mon Nov 18, 2024 6:39 pm Happy Monday folks.

Here you can find the MT5 version of the Market Structure Indicator and also MT4/5 of another very good indi, the Donchian Zig-Zag, try to match it with Xard or my system and let me know ;)

Love

+C+
Hello Cagliostro. This seems like the correct place. If you get time, can you please add an on/off botton for the Donchian ex4. Thank you.

Re: Already Converted TradingView Indicators to MT4 Indicators

507
Abzak wrote: Wed Dec 11, 2024 1:38 am Hello Cagliostro. This seems like the correct place. If you get time, can you please add an on/off botton for the Donchian ex4. Thank you.
Unfortunately Luxalgo stuff cannot be modified.
These users thanked the author Cagliostro for the post:
Abzak
"I conjure from shadows and shape fortunes from the unseen. The treasure lies hidden in plain sight, beneath the sunlight." - Cagliostro

DownloadRe: Already Converted TradingView Indicators to MT4 Indicators

508
ok i am going to give this a go
my request is for the bx-trender

title:
B-Xtrender @Puppytherapy[/b]

Link:
https://www.tradingview.com/v/YHZimEz8/

////////////////////////////
link to pdf literature

https://ifta.org/public/files/journal/d ... nal_19.pdf

reason why?:

i am fond of this indicator and it seems to be popular. it was well formulated included is the literature giving explanation better than i could link is on the TV page.
it uses multiply indicators in one. is accurate at tracking short term and longer price fluctuations. i am anxious to see how it lines up with some of my
other indicators in mt4. i tried to convert it a couple of times quickly and was unsuccessful it kept freezing my terminal and when i got past that i only got a line to display though i am anxious to see the converted indicator. i will likely be matching it up looking for confluence for signal filtering and suspect it may be a worth while addition i feel it has value like most indicators given it is applied in the proper aspect. not sure what the conversion will look like its a little busy i may investigate adding transition points or buffers on the longer histogram Ma for differentiating short movements and longer ones. i looked around did not see that it had been done. i think it is a worth while inclusion. the second picture has circles for reference there is a bicolor line of the longer average that i was referring to.

Code: Select all

//@version=4
study("B-Xtrender @Puppytherapy")

short_l1 = input(5 , title="Short - L1")
short_l2 = input(20, title="Short - L2")
short_l3 = input(15, title="Short - L3")

long_l1  = input(20, title="Long - L1")
long_l2  = input(15, title="Long - L2")

shortTermXtrender = rsi(ema(close, short_l1) - ema(close, short_l2), short_l3 ) - 50
longTermXtrender  = rsi( ema(close, long_l1), long_l2 ) - 50

shortXtrenderCol = shortTermXtrender > 0 ? shortTermXtrender > shortTermXtrender[1] ? color.lime : #228B22 : shortTermXtrender > shortTermXtrender[1] ? color.red : #8B0000
plot(shortTermXtrender, color=shortXtrenderCol, style=plot.style_columns, linewidth=1, title="B-Xtrender Osc. - Histogram", transp = 50)

t3(src, len)=>
    xe1_1 = ema(src,    len)
    xe2_1 = ema(xe1_1,  len)
    xe3_1 = ema(xe2_1,  len)
    xe4_1 = ema(xe3_1,  len)
    xe5_1 = ema(xe4_1,  len)
    xe6_1 = ema(xe5_1,  len)
    b_1 = 0.7
    c1_1 = -b_1*b_1*b_1
    c2_1 = 3*b_1*b_1+3*b_1*b_1*b_1
    c3_1 = -6*b_1*b_1-3*b_1-3*b_1*b_1*b_1
    c4_1 = 1+3*b_1+b_1*b_1*b_1+3*b_1*b_1
    nT3Average_1 = c1_1 * xe6_1 + c2_1 * xe5_1 + c3_1 * xe4_1 + c4_1 * xe3_1
    
maShortTermXtrender = t3( shortTermXtrender , 5 )

colShortTermXtrender = maShortTermXtrender > maShortTermXtrender[1] ? color.lime : color.red
plot(maShortTermXtrender, color=#000000             , style=plot.style_line, linewidth=5, title="B-Xtrender Shadow")
plot(maShortTermXtrender, color=colShortTermXtrender, style=plot.style_line, linewidth=3, title="B-Xtrender Color ")

plotshape(maShortTermXtrender > maShortTermXtrender[1] and maShortTermXtrender[1] < maShortTermXtrender[2] ? maShortTermXtrender : na, location=location.absolute, style=shape.circle, color=color.lime, size=size.tiny, transp=10)
plotshape(maShortTermXtrender < maShortTermXtrender[1] and maShortTermXtrender[1] > maShortTermXtrender[2] ? maShortTermXtrender : na, location=location.absolute, style=shape.circle, color=color.red , size=size.tiny, transp=10)

longXtrenderCol   = longTermXtrender> 0 ? longTermXtrender > longTermXtrender[1] ? color.lime : #228B22 : longTermXtrender > longTermXtrender[1] ? color.red : #8B0000
macollongXtrenderCol =  longTermXtrender > longTermXtrender[1] ? color.lime : color.red
plot(longTermXtrender , color=longXtrenderCol, style=plot.style_histogram, linewidth=2, title="B-Xtrender Trend - Histogram", transp = 80)

plot(longTermXtrender , color=#000000             , style=plot.style_line, linewidth=5, title="B-Xtrender Trend - Line", transp = 80)
plot(longTermXtrender , color=macollongXtrenderCol, style=plot.style_line, linewidth=3, title="B-Xtrender Trend - Line", transp = 80)

think that does it hope i got everything in the right fashion for submission
thanks for the consideration. with any luck ill be sending over my thank you for the converted indicator
happy holidays thanks a bunch

Re: Already Converted TradingView Indicators to MT4 Indicators

509
nine wrote: Thu Dec 19, 2024 3:52 am ok i am going to give this a go
my request is for the bx-trender

title:
B-Xtrender @Puppytherapy[/b]

Link:
https://www.tradingview.com/v/YHZimEz8/

////////////////////////////
link to pdf literature

https://ifta.org/public/files/journal/d ... nal_19.pdf

reason why?:

i am fond of this indicator and it seems to be popular. it was well formulated included is the literature giving explanation better than i could link is on the TV page.
it uses multiply indicators in one. is accurate at tracking short term and longer price fluctuations. i am anxious to see how it lines up with some of my
other indicators in mt4. i tried to convert it a couple of times quickly and was unsuccessful it kept freezing my terminal and when i got past that i only got a line to display though i am anxious to see the converted indicator. i will likely be matching it up looking for confluence for signal filtering and suspect it may be a worth while addition i feel it has value like most indicators given it is applied in the proper aspect. not sure what the conversion will look like its a little busy i may investigate adding transition points or buffers on the longer histogram Ma for differentiating short movements and longer ones. i looked around did not see that it had been done. i think it is a worth while inclusion. the second picture has circles for reference there is a bicolor line of the longer average that i was referring to.

Code: Select all

//@version=4
study("B-Xtrender @Puppytherapy")

short_l1 = input(5 , title="Short - L1")
short_l2 = input(20, title="Short - L2")
short_l3 = input(15, title="Short - L3")

long_l1  = input(20, title="Long - L1")
long_l2  = input(15, title="Long - L2")

shortTermXtrender = rsi(ema(close, short_l1) - ema(close, short_l2), short_l3 ) - 50
longTermXtrender  = rsi( ema(close, long_l1), long_l2 ) - 50

shortXtrenderCol = shortTermXtrender > 0 ? shortTermXtrender > shortTermXtrender[1] ? color.lime : #228B22 : shortTermXtrender > shortTermXtrender[1] ? color.red : #8B0000
plot(shortTermXtrender, color=shortXtrenderCol, style=plot.style_columns, linewidth=1, title="B-Xtrender Osc. - Histogram", transp = 50)

t3(src, len)=>
    xe1_1 = ema(src,    len)
    xe2_1 = ema(xe1_1,  len)
    xe3_1 = ema(xe2_1,  len)
    xe4_1 = ema(xe3_1,  len)
    xe5_1 = ema(xe4_1,  len)
    xe6_1 = ema(xe5_1,  len)
    b_1 = 0.7
    c1_1 = -b_1*b_1*b_1
    c2_1 = 3*b_1*b_1+3*b_1*b_1*b_1
    c3_1 = -6*b_1*b_1-3*b_1-3*b_1*b_1*b_1
    c4_1 = 1+3*b_1+b_1*b_1*b_1+3*b_1*b_1
    nT3Average_1 = c1_1 * xe6_1 + c2_1 * xe5_1 + c3_1 * xe4_1 + c4_1 * xe3_1
    
maShortTermXtrender = t3( shortTermXtrender , 5 )

colShortTermXtrender = maShortTermXtrender > maShortTermXtrender[1] ? color.lime : color.red
plot(maShortTermXtrender, color=#000000             , style=plot.style_line, linewidth=5, title="B-Xtrender Shadow")
plot(maShortTermXtrender, color=colShortTermXtrender, style=plot.style_line, linewidth=3, title="B-Xtrender Color ")

plotshape(maShortTermXtrender > maShortTermXtrender[1] and maShortTermXtrender[1] < maShortTermXtrender[2] ? maShortTermXtrender : na, location=location.absolute, style=shape.circle, color=color.lime, size=size.tiny, transp=10)
plotshape(maShortTermXtrender < maShortTermXtrender[1] and maShortTermXtrender[1] > maShortTermXtrender[2] ? maShortTermXtrender : na, location=location.absolute, style=shape.circle, color=color.red , size=size.tiny, transp=10)

longXtrenderCol   = longTermXtrender> 0 ? longTermXtrender > longTermXtrender[1] ? color.lime : #228B22 : longTermXtrender > longTermXtrender[1] ? color.red : #8B0000
macollongXtrenderCol =  longTermXtrender > longTermXtrender[1] ? color.lime : color.red
plot(longTermXtrender , color=longXtrenderCol, style=plot.style_histogram, linewidth=2, title="B-Xtrender Trend - Histogram", transp = 80)

plot(longTermXtrender , color=#000000             , style=plot.style_line, linewidth=5, title="B-Xtrender Trend - Line", transp = 80)
plot(longTermXtrender , color=macollongXtrenderCol, style=plot.style_line, linewidth=3, title="B-Xtrender Trend - Line", transp = 80)

think that does it hope i got everything in the right fashion for submission
thanks for the consideration. with any luck ill be sending over my thank you for the converted indicator
happy holidays thanks a bunch
Hello, I made this simple version, for now without T3.
But after your test, I am able do some adjustment, but test it first please....
These users thanked the author kvak for the post (total 7):
ujtrader, nine, thomdel, Jimmy, moey_dw, specialkey, RodrigoRT7

Re: Already Converted TradingView Indicators to MT4 Indicators

510
excellent will do thank you.
looks good histograms seem to be fairly accurate small nuances but largely very similar close to spot on . usually when i reference it its to confirm entries or exits with the line that has the dots that is missing i either follow the dots or as the line crosses out of the histogram which happens to be where most the dots are. that i noticed some of the larger trend moves and the background ema(think that is what it is) as it switches colors details some of the bigger trend moves will likely increase the size of the line in the background in the settings.

not sure yet but i am looking at the dots on the lines and the longer ma on the transparent background histo not sure if thats an ema ?
i dont do much manual trading mostly look at automating. id like to get a look at the code or a copy if possible if not noworries i dont want to break any of the forum rules or request work you may be unwilling to share. i appreciate your time and effort to fulfill my request. if i find a data point for confluence it will likely be the dots on the foreground line or maybe the transition of the background line.

cazy smart money move on euro usd like 100-150 pips a little while ago at a glance. a new recent low hasnt been that low in a while. i have a strategy for euro i am working on i am down to the last round of filtering was hoping something like this might contribute ill have to have a look if any other features are added. this looks great awesome looking work. if i had a wish list it would be for the foreground line with the dots and maybe dots on the background line when the bicolor line changes. that would make it about set. thanks for the time to do it and any consideration.

i put them beside each other and put some marks from what i could tell they are outputing very simalar almost identical values. it looks real good. and looks good in the mt4 terminal. the only real difference i can see is the size and some shading on the histos but is likely the difference in output displays. i look at the histo but mostly when reveiw have been looking at the dots and line transitions in comparrison with the chart and my other indicators. thanks again spectacular work much appreciated
These users thanked the author nine for the post:
kvak