DIVERGENCE - futures io
futures io futures trading



DIVERGENCE


Discussion in EasyLanguage Programming

Updated
    1. trending_up 3,247 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

DIVERGENCE

(login for full post details)
  #1 (permalink)
SAINT RAPHAEL FRANCE
 
Experience: Advanced
Platform: TRADESTATION
Trading: FUTURE
 
Posts: 2 since Oct 2013
Thanks: 0 given, 0 received

I have a simple indicator divergence written in easy language (see file
attached)

It distinguishes and trace High Low on courses that are not accompanied by High Low on indicator

I'd like to turn this indicator to detect the so-called Hidden differences or otherwise

That is to say:

High Low on the indicator that are not accompanied
by High Low on courses

Looking for someone to do this work (of course pay for this work)

Do you have a name?

BBJAP


{DIVERGENCES macd}

inputsrice(Close),FastMA(9),SlowMA(19),MacdMA(6),Tracage(1),Maxbarres(50);
vars:div1(0);
vars:croise(0);
vars:continue(0);
vars:achat(0),vente(0),valmacd(0),avgmacd(0);
vars:limite(10),indice(0),max(0),depart(0),sommet(0);
varsoint1(0),point2(0),maxsommet(0);
vars:nb_hausse(0),nb_baisse(0);
array:croise_hausse[110](0);
array:croise_baisse[110](0);
array:cours_hausse[110](0);
array:cours_baisse[110](0);
array:barre_baisse[110](0);
array:barre_hausse[110](0);
achat=0;
vente=0;
croise=0;
maxsommet=30;
if (currentbar<=1) then
begin
nb_hausse=0;
nb_baisse=0;
end
else
begin
for indice=1 to nb_hausse
begin
barre_hausse[indice]=barre_hausse[indice]+1;
end;
for indice=1 to nb_baisse
begin
barre_baisse[indice]=barre_baisse[indice]+1;
end;
valmacd=macd(price,FastMA,SlowMA);
avgmacd=xaverage(valmacd,MacdMA);
if (valmacd>avgmacd) and (valmacd[1]<avgmacd[1]) then
begin
nb_hausse=nb_hausse+1;
if (nb_hausse>maxsommet) then
begin
for indice=1 to maxsommet
begin
croise_hausse[indice]=croise_hausse[indice+1];
cours_hausse[indice]=cours_hausse[indice+1];
barre_hausse[indice]=barre_hausse[indice+1];
nb_hausse=maxsommet;
end;
end;
if (valmacd[2]>valmacd[1]) and (valmacd>valmacd[1]) then indice=1
else indice=swinglowbar(1,valmacd,2,20);
if (indice>0) then
begin
croise_hausse[nb_hausse]=valmacd[indice];
indice=lowestbar(low,10);
cours_hausse[nb_hausse]=low[indice];
barre_hausse[nb_hausse]=indice;
sommet=indice;
end;
croise=1;
end;
if (valmacd<avgmacd) and (valmacd[1]>avgmacd[1]) then
begin
nb_baisse=nb_baisse+1;
if (nb_baisse>maxsommet) then
begin
for indice=1 to maxsommet
begin
croise_baisse[indice]=croise_baisse[indice+1];
cours_baisse[indice]=cours_baisse[indice+1];
barre_baisse[indice]=barre_baisse[indice+1];
nb_baisse=maxsommet;
end;
end;
if (valmacd[2]<valmacd[1]) and (valmacd<valmacd[1]) then indice=1
else indice=swinghighbar(1,valmacd,2,20);
if (indice>0) then
begin
croise_baisse[nb_baisse]=valmacd[indice];
indice=highestbar(high,10);
cours_baisse[nb_baisse]=high[indice];
barre_baisse[nb_baisse]=indice;
sommet=indice;
end;
croise=-1;
end;
if (valmacd<valmacd[1]) and (valmacd[1]>valmacd[2]) and (nb_baisse>1)
then
begin
continue=1;
indice=nb_baisse;
while (continue=1)
begin
if (barre_baisse[indice]>maxbarres) then
begin
continue=0;
indice=0;
end
else
begin
if (croise_baisse[indice]>valmacd[1]) then continue=0
else
begin
indice=indice-1;
if (indice<1) then
begin
continue=0;
indice=0;
end;
end;
end;
end;
if (indice>0) then
begin
sommet=highestbar(high,5);
if (cours_baisse[indice]<=high[sommet])and (sommet<barre_baisse[indice]) then
begin
vente=1;
depart=indice;
point2=barre_baisse[depart];
end;
end;
end;
if (valmacd>valmacd[1]) and (valmacd[1]<valmacd[2]) and (nb_hausse>1)
then
begin
continue=1;
indice=nb_hausse;
while (continue=1)
begin
if (barre_hausse[indice]>maxbarres) then
begin
continue=0;
indice=0;
end
else
begin
if (croise_hausse[indice]<valmacd[1]) then continue=0
else
begin
indice=indice-1;
if (indice<1) then
begin
continue=0;
indice=0;
end;
end;
end;
end;
if (indice>0) then
begin
sommet=lowestbar(low,5);
if (cours_hausse[indice]>low[sommet])and (sommet<barre_hausse[indice]) then
begin
achat=1;
depart=indice;
point2=barre_hausse[depart];
end;
end;
end;
vars:retour(0);
if (vente=0) and (valmacd<valmacd[1]) then
begin
value60=0;
value61=0;
retour=swinghighbar(1,valmacd,2,20);
if (retour>2) and (retour<7) then
begin
if (valmacd<valmacd[retour]) and (high>high[retour]) then
begin
vente=1;
depart=indice;
sommet=0;
point2=retour;
end;
end;
end;
if (achat=0) and (valmacd>valmacd[1]) then
begin
retour=swinglowbar(1,valmacd,2,20);
if (retour>2)and (retour<7) then
begin
if (valmacd>valmacd[retour]) and (low<low[retour]) then
begin
achat=1;
depart=indice;
sommet=0;
point2=retour;
end;
end;
end;
div1=0;

if (achat=1) then

begin
div1=1;

if (Tracage=1) then

begin

if (time[point2]<>time[sommet])


then begin

value11=TL_New (Date[point2], Time[point2], low[point2], Date[sommet], Time[sommet], low[sommet]);

TL_SetStyle(value11, tool_solid);
TL_SetSize(value11,1) ;
TL_SetColor(value11,green);
end;
end;
end;

if (vente=1) then
begin

div1=-1;

if (Tracage=1) then
begin

if (time[point2]<>time[sommet])

then begin

value11=TL_New (Date[point2], Time[point2], high[point2], Date[sommet], Time[sommet], high[sommet]);

TL_SetStyle(value11, tool_solid);
TL_SetSize(value11,1) ;
TL_SetColor(value11,red);
end;
end;
end;
end;

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
Which kind of Blockvolume is visible? - order processing
Emini and Emicro Index
What blockvolume is visible? - order processing
NinjaTrader
Second Entry Indicator (Looking for testers/feedback)
NinjaTrader
SimplerOptions
Trading Reviews and Vendors
MACD line not plotting after change of plot order
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Selling Options on Futures?
109 thanks
Battlestations: Show us your trading desks!
108 thanks
Rank your Futures vs Stocks trading priority
55 thanks
Want your NinjaTrader indicator created, free?
27 thanks
Whats this confusion with margins?
21 thanks
 
(login for full post details)
  #3 (permalink)
Philadelphia
 
Experience: None
Platform: corded black telephone
Trading: ticker tape
 
Posts: 2,893 since Apr 2012
Thanks: 1,683 given, 3,666 received


I see a few times

anyways, you might want to try https://futures.io/hire-consultant-programmer/

R.I.P. Joseph Bach (Itchymoku), 1987-2018.
Please visit this thread for more information.
Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > DIVERGENCE


Last Updated on October 3, 2013


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts