cycle indicator - EasyLanguage Programming | futures io social day trading
futures io futures trading


cycle indicator
Updated: Views / Replies:414 / 2
Created: by tsxela Attachments:2

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 
Thread Tools Search this Thread
 

cycle indicator

  #1 (permalink)
Trading Apprentice
modena italy
 
Futures Experience: Advanced
Platform: tradestation
Favorite Futures: option
 
Posts: 1 since Jul 2014
Thanks: 1 given, 0 received

cycle indicator

I would know if it is possible to adapte this code from TS (9.1) to Multichart :

var: Docking("");
var: Candlewid(0);

{ COLORS }

var: orange(rgb(255, 65, 0));
var: skyblue(rgb(75, 206, 250));
var: gold(rgb(255, 180, 40));
var: pink(rgb(255, 165, 255));

var: PinkFac(0), GoldFac(0), BlueFac(0), OrangeFac(0), CyanFac(0);
var: freqPink(0), freqGold(0), freqBlue(0), freqOrange(0), freqCyan(0);
var: ampPink(0), ampGold(0), ampBlue(0), ampOrange(0), ampCyan(0);

var: ok2recalc(false);
var:
Button btnRestore(null),
Form frmMain(Null);

const:
frm.width( 400 ), frm.height( 600 ),
btn.width( 60 ), btn.height( 20 ),
lbl.width( 30 ), lbl.height( 15 ),
txt.width( 60 ), txt.height( 15 ), widetxt.width( 180 ),
cbo.width( 80 ), cbo.height( 30 ),
chk.width( 20 ), chk.height( 20 ), widechk.width( 120 ),
rdo.width( 80 ), rdo.height( 15 ),
spn.width( 33 ), spn.height( 30 ),
widelbl.width( 60 ), widelbl.height( 30 ),
bigbtn.width( 80 ), bigbtn.height( 30 ),
spacer( 3 ),
columnwidth( 100 );

Const: lblwidfac(1.1);
const: chkAdjust(3), spnAdjust(0);

var: shiftPink(2);
var: shiftGold(shiftPink*3);
var: shiftBlue(shiftGold*3);
var: shiftOrange(shiftBlue*3);
var: shiftCyan(shiftOrange*3);

const: avgbb(8);
var: cyclewid(1); //Once If StringContains(ShoCycle,"O") or StringContains(ShoCycle,"C") then cyclewid = 0;
var: freq(0);
var: plotfac(100000); // quick and dirty way to plot on forex, es and nq

If chkShoCyclePink <> null then begin
var: basePink(0); basePink = cosine(freq/freqPink * (currentbar));
var: baseGold(0); baseGold = cosine(freq/freqGold * (currentbar));
var: baseBlue(0); baseBlue = cosine(freq/freqBlue * (currentbar));
var: baseOrange(0); baseOrange = cosine(freq/freqOrange * (currentbar));
var: baseCyan(0); baseCyan = cosine(freq/freqCyan * (currentbar));

var: cyclePink(0); cyclePink = baseCyan*ampCyan + baseOrange*ampOrange + Baseblue*ampBlue + baseGold*ampGold + basePink*(ampPink);
var: cycleGold(0); cycleGold = baseCyan*ampCyan + baseOrange*ampOrange + Baseblue*ampBlue + baseGold*(ampPink+ampGold);
var: cycleBlue(0); cycleBlue = baseCyan*ampCyan + baseOrange*ampOrange + baseblue*(ampPink+ampGold+ampBlue);
var: cycleOrange(0); cycleOrange = baseCyan*ampCyan + baseorange*(ampPink+ampGold+ampBlue+ampOrange);
var: cycleCyan(0); cycleCyan = baseCyan*(ampPink+ampGold+ampBlue+ampOrange+ampCyan);

If chkShoCyclePink.Checked then begin
plot11(plotfac*cyclePink,"p11",pink,default,cyclewid);
If chkShoObosPink.checked then begin
If basePink > .85 and basePink > basePink[1] then
plot11(plot11,"p11",default,default,5);
If basePink < -.85 and basePink < basePink[1] then
plot11(plot11,"p11",default,default,5);
end;
end;

If chkShoCycleGold.Checked then begin
plot12(plotfac*cycleGold[shiftGold],"p12",gold,default,cyclewid);
If chkShoObosGold.checked then begin
If baseGold[shiftGold] > .85 and baseGold[shiftGold] > baseGold[shiftGold+1] then
plot12(plot12,"p12",default,default,5);
If baseGold[shiftGold] < -.85 and baseGold[shiftGold] < baseGold[shiftGold+1] then
plot12(plot12,"p12",default,default,5);
end;
end;

If chkShoCycleBlue.Checked then begin
plot13(plotfac*cycleBlue[shiftBlue],"p13",skyblue,default,cyclewid);
If chkShoObosBlue.checked then begin
If baseBlue[shiftBlue] > .85 and baseBlue[shiftBlue] > baseBlue[shiftBlue+1] then
plot13(plot13,"p13",default,default,5);
If baseBlue[shiftBlue] < -.85 and baseBlue[shiftBlue] < baseBlue[shiftBlue+1] then
plot13(plot13,"p13",default,default,5);
end;
end;

If chkShoCycleOrange.Checked then begin
plot14(plotfac*cycleOrange[shiftOrange],"p14",orange,default,cyclewid);
If chkShoObosOrange.checked then begin
If baseOrange[shiftOrange] > .85 and baseOrange[shiftOrange] > baseOrange[shiftOrange+1] then
plot14(plot14,"p14",default,default,5);
If baseOrange[shiftOrange] < -.85 and baseOrange[shiftOrange] < baseOrange[shiftOrange+1] then
plot14(plot14,"p14",default,default,5);
end;
end;

If chkShoCycleCyan.Checked then begin
plot15(plotfac*cycleCyan[shiftCyan],"p15",darkcyan,default,cyclewid);
If chkShoObosCyan.checked then begin
If baseCyan[shiftCyan] > .75 and baseCyan[shiftCyan] > baseCyan[shiftCyan+1] then
plot15(plot15,"p15",default,default,5);
If baseCyan[shiftCyan] < -.75 and baseCyan[shiftCyan] < baseCyan[shiftCyan+1] then
plot15(plot15,"p15",default,default,5);
end;
end;

var: Vector vcc(null); Once vcc = New vector;
If not appstorage["rdoNone.checked"] astype bool then begin
var: price(0); price = baseCyan*ampCyan + baseOrange*ampOrange + Baseblue*ampBlue + baseGold*ampGold + basePink*(ampPink);
var: rng(0); Once rng = (spnBarRange.value/100)*(ampPink+ampGold+ampBlue+ampOrange+ampCyan);
If mod(currentbar,spnBarSeparation.Value) = 0 then begin
var: hh(0); hh = price+random(rng);
var: ll(0); ll = price-random(rng);
If hh < ll[1] then hh = ll[1];
If ll > hh[1] then ll = hh[1];
var: cc(0); cc = oo_iff(price>price[1],ll+.8*(hh-ll),ll+.2*(hh-ll));
plot93(plotfac*cc,"p93");
plot94(plotfac*hh,"p94");
plot95(plotfac*ll,"p95");
If appstorage["rdoCandlesticks.checked"] astype bool then begin
plot91(plotfac*cc,"p91",oo_iff(cc>cc[1],green,red),default,candlewid);
plot92(plotfac*cc[1],"p92");
end;

If False then begin
vcc.insert(0,cc);

var: avgbb2(0);
If chkCalcCycleCyan.checked then avgbb2 = freqCyan
else If chkCalcCycleOrange.checked then avgbb2 = freqOrange
else If chkCalcCycleBlue.checked then avgbb2 = freqBlue
else If chkCalcCycleGold.checked then avgbb2 = freqGold
else If chkCalcCyclePink.checked then avgbb2 = freqPink
Else avgbb2 = 1;
If vcc.count > avgbb2*9 then begin
//print("vcc.count; ",vcc.count:5:0);
//plot41(oo_hma(vcc,50),"p41",white,default,3);
plot41(plotfac*average(vcc,3*avgbb2),"p41",white,default,3);
plot42(plotfac*average(vcc,9*avgbb2),"p42",white,default,3);
end;
end;

var: Pinkdir(0), hhPink(0), vhhPink(0), llPink(0), vllPink(0);
Pinkdir = oo_iff(cyclePink>cyclePink[1],1,-1);
Switch Pinkdir begin
Case 1: If Pinkdir <> Pinkdir[1] then begin vllPink = llPink; hhPink = hh; end;
If vhhPink < hh then vhhPink = hh; If vllPink > ll then vllPink = ll;
Case -1: If Pinkdir <> Pinkdir[1] then begin vhhPink = hhPink; llPink = ll; end;
If vhhPink < hh then vhhPink = hh; If vllPink > ll then vllPink = ll;
end;
If llPink > ll then llPink = ll; If hhPink < hh then hhPink = hh;

var: Golddir(0), hhGold(0), vhhGold(0), llGold(0), vllGold(0);
Golddir = oo_iff(cycleGold>cycleGold[1],1,-1);
Switch Golddir begin
Case 1: If Golddir <> Golddir[1] then begin vllGold = llGold; hhGold = hh; end;
If vhhGold < hh then vhhGold = hh; If vllGold > ll then vllGold = ll;
Case -1: If Golddir <> Golddir[1] then begin vhhGold = hhGold; llGold = ll; end;
If vhhGold < hh then vhhGold = hh; If vllGold > ll then vllGold = ll;
end;
If llGold > ll then llGold = ll; If hhGold < hh then hhGold = hh;

var: bluedir(0), hhBlue(0), vhhBlue(0), llBlue(0), vllBlue(0);
bluedir = oo_iff(cycleBlue>cycleBlue[1],1,-1);
Switch bluedir begin
Case 1: If bluedir <> bluedir[1] then begin vllBlue = llBlue; hhBlue = hh; end;
If vhhBlue < hh then vhhBlue = hh; If vllBlue > ll then vllBlue = ll;
Case -1: If bluedir <> bluedir[1] then begin vhhBlue = hhBlue; llBlue = ll; end;
If vhhBlue < hh then vhhBlue = hh; If vllBlue > ll then vllBlue = ll;
end;
If llBlue > ll then llBlue = ll; If hhBlue < hh then hhBlue = hh;

var: Orangedir(0), hhOrange(0), vhhOrange(0), llOrange(0), vllOrange(0);
Orangedir = oo_iff(cycleOrange>cycleOrange[1],1,-1);
Switch Orangedir begin
Case 1: If Orangedir <> Orangedir[1] then begin vllOrange = llOrange; hhOrange = hh; end;
If vhhOrange < hh then vhhOrange = hh; If vllOrange > ll then vllOrange = ll;
Case -1: If Orangedir <> Orangedir[1] then begin vhhOrange = hhOrange; llOrange = ll; end;
If vhhOrange < hh then vhhOrange = hh; If vllOrange > ll then vllOrange = ll;
end;
If llOrange > ll then llOrange = ll; If hhOrange < hh then hhOrange = hh;

var: Cyandir(0), hhCyan(0), vhhCyan(0), llCyan(0), vllCyan(0);
Cyandir = oo_iff(cycleCyan>cycleCyan[1],1,-1);
Switch Cyandir begin
Case 1: If Cyandir <> Cyandir[1] then begin vllCyan = llCyan; hhCyan = hh; end;
If vhhCyan < hh then vhhCyan = hh; If vllCyan > ll then vllCyan = ll;
Case -1: If Cyandir <> Cyandir[1] then begin vhhCyan = hhCyan; llCyan = ll; end;
If vhhCyan < hh then vhhCyan = hh; If vllCyan > ll then vllCyan = ll;
end;
If llCyan > ll then llCyan = ll; If hhCyan < hh then hhCyan = hh;
end;
If chkShoHHLLPink.checked then begin
plot69(plotfac*vhhPink,"p69",Pink);
plot68(plotfac*vllPink,"p68",Pink);
end;
If chkShoHHLLGold.checked then begin
plot67(plotfac*vhhGold,"p67",Gold);
plot66(plotfac*vllGold,"p66",Gold);
end;
If chkShoHHLLBlue.checked then begin
plot65(plotfac*vhhBlue,"p65",skyblue);
plot64(plotfac*vllBlue,"p64",skyblue);
end;
If chkShoHHLLOrange.checked then begin
plot63(plotfac*vhhOrange,"p63",Orange);
plot62(plotfac*vllOrange,"p62",Orange);
end;
If chkShoHHLLCyan.checked then begin
plot61(plotfac*vhhCyan,"p61",Cyan);
plot60(plotfac*vllCyan,"p60",Cyan);
end;
end;

Plot96(c,"p96",black,default,2);
Plot97(h,"p97",black,default,0);
Plot98(l,"p98",black,default,0);

If False then begin
plot97(1.25*(ampPink+ampGold+ampBlue+ampOrange+ampCyan),"p97",black,default,cyclewid);
plot98(-1.25*(ampPink+ampGold+ampBlue+ampOrange+ampCyan),"p98",black,default,cyclewid);
end;
end;

Once Begin
If chkShoCyclePink.Checked then freq = 1;
If chkShoCycleGold.Checked then freq = 2;
If chkShoCycleBlue.Checked then freq = 4;
If chkShoCycleOrange.Checked then freq = 8;
If chkShoCycleCyan.Checked then freq = 16;

If not chkCalcCyclePink.Checked then ampPink = 0;
If not chkCalcCycleGold.Checked then ampGold = 0;
If not chkCalcCycleBlue.Checked then ampBlue = 0;
If not chkCalcCycleOrange.Checked then ampOrange = 0;
If not chkCalcCycleCyan.Checked then ampCyan = 0;
end;


Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

thank you in advance

Attached Files
Register to download File Type: eld FUN WITH CYCLES.ELD (55.1 KB, 19 views)
Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,529 since Apr 2013
Thanks: 230 given, 854 received
Forum Reputation: Legendary


tsxela,

you can't really convert it as it uses functionality that is not available in Multicharts like forms for example). It also appears that a huge part of the code is missing - which is likely to be the designer generated code. While you could strap away everything that MC doesn't support, it's quite likely that the end result would be very limited and therefore I am not sure if it would be worth the effort.

Regards,

ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:

Reply



futures io > > > > > cycle indicator

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Schaff Trend Cycle Indicator cbritton ThinkOrSwim Programming 21 July 26th, 2017 10:10 AM
Cycle Based Indicator - Help! sburtt NinjaTrader Programming 2 March 21st, 2013 02:48 PM
Ehlers Cycle Period Indicator kabakj NinjaTrader 5 January 15th, 2013 06:47 PM
Cycle progression? Leo123 NinjaTrader Programming 3 February 28th, 2012 06:04 AM
Identifying market cycle Azharr Traders Hideout 1 January 28th, 2012 07:11 AM


All times are GMT -4. The time now is 12:39 AM.

Copyright © 2017 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
Page generated 2017-12-13 in 0.13 seconds with 20 queries on phoenix via your IP 54.221.93.187