Re: New Gann Swing Chartist Plan - Gann Trend Oscillator + Gann Swing Oscillator

4
Macio wrote: Sun Oct 10, 2021 12:43 am I need someone to help me.
I have Gann Trend Oscillator but I can't find Gann Swing Oscillator.
No idea. Having a look through our very old archives I could only find this. Would this be what you're looking for?
These users thanked the author Jimmy for the post (total 6):
Macio, mosape, rabah, Juertes, R2D2, andrei-1
Guide to the "All Averages" Filters (ADXvma, Laguerre etc.) 🆕
Use Fibonacci numbers for indicator settings + How to draw Fibonacci Extensions
An easy trick for drawing Support & Resistance


Re: New Gann Swing Chartist Plan - Gann Trend Oscillator + Gann Swing Oscillator

9
shinnosuke wrote: Thu May 19, 2022 9:46 pm Hello Macio,
do you have the mq4 version of this Gann Trend Oscillator?
I try to search it on google but no luck.
best regards.
I find someone posted the code, but needs to work with this code to get a final one. I am not coder and i dont know how to explain in detail :)

Code: Select all

Sd:= FmlVar("GANN-Swing","TD1") ;
{Swing Change High}
Sch:=If(Sd=1 AND Ref(sd,-1)=-1,
{then}1,
{else}0);
{Swing Change Low}
Scl:=If(Sd=-1 AND Ref(Sd,-1)=1,
{then}1,
{else}0);
{Peak Value}
Pv:=If(Scl=1,
{then}HighestSince(1,Sch=1,H),
{else}0);
{Trough Value}
Tv:=If(Sch=1,
{then}LowestSince(1,Scl=1,L),
{else}0);
{Trend Direction}
Td:=If(H>ValueWhen(1,Pv>0,Pv),
{then}1,
{else}If(L<ValueWhen(1,Tv>0,Tv),
{then}-1,
{else}0));
{UpTrend=1 DownTrend =-1}
Tdv:=ValueWhen(1,Td<>0,Td);
Tdv;
These users thanked the author sal for the post:
shinnosuke
"There is NO GOD higher than TRUTH" - Mahatma Gandhi

Re: New Gann Swing Chartist Plan - Gann Trend Oscillator + Gann Swing Oscillator

10
sal wrote: Fri May 20, 2022 2:12 am I find someone posted the code, but needs to work with this code to get a final one. I am not coder and i dont know how to explain in detail :)
Hi sal, thanks for the efforts.
And i found this indicator code on tra.....ew forums.
Can this help us to create the mt4 version?

Code: Select all

//@version=4
// Copyright (c) 2019-present, Franklin Moormann (cheatcountry)
// Gann Trend Oscillator [CC] script may be freely distributed under the MIT license.
study("Gann Trend Oscillator [CC]", overlay=false)

inp = input(title="Source", type=input.source, defval=close)
res = input(title="Resolution", type=input.resolution, defval="")
rep = input(title="Allow Repainting?", type=input.bool, defval=false)
bar = input(title="Allow Bar Color Change?", type=input.bool, defval=true)
src = security(syminfo.tickerid, res, inp[rep ? 0 : barstate.isrealtime ? 1 : 0])[rep ? 0 : barstate.isrealtime ? 0 : 1]
length = input(title="Length", type=input.integer, defval=3, minval=1)

hv = highest(src, length)
lv = lowest(src, length)

gto = 0
gto := hv[2] > hv[1] and hv[0] > hv[1] ? 1 : lv[2] < lv[1] and lv[0] < lv[1] ? -1 : nz(gto[1])

sig = gto > 0 ? 1 : gto < 0 ? -1 : 0
alertcondition(crossover(sig, 0), "Buy Signal", "Bullish Change Detected")
alertcondition(crossunder(sig, 0), "Sell Signal", "Bearish Change Detected")
gtoColor = sig > 0 ? color.green : sig < 0 ? color.red : color.black
barcolor(bar ? gtoColor : na)
plot(gto, title="GTO", linewidth=2, color=gtoColor)
These users thanked the author shinnosuke for the post:
jonnyfx4711


Who is online

Users browsing this forum: Applebot [Crawler], Bing [Bot], Facebook [Crawler], Majestic-12 [Bot], Ricstar_8, Yandex [Bot] and 59 guests