Jump to content

Trading With an Edge


Recommended Posts

  • 2 weeks later...
  • 1 month later...

Hi Folks...I got a very similar code. Actually it's just a series of Keltner channels here is the code......can anyone please translate it into MT4 This code you see now is for THINK OR SWIM platform

 

declare weak_volume_dependency;
input displace = 0;
input displace2 = 0;
input displace3 = 0;
input factor = 1.75;
input factor2 = 2.5;
input factor3 = 4;
input length = 45;
input price = close;
def shift = factor * AvgTrueRange(high, close, low, length);
def shift2 = factor2 * AvgTrueRange(high, close, low, length);
def shift3 = factor3 * AvgTrueRange(high, close, low, length);
def average = ExpAverage(price, length);
plot Avg = average[-displace];
Avg.SetDefaultColor(GetColor(7));
plot Upper_Band = average[-displace] + shift[-displace];
Upper_Band.SetDefaultColor(GetColor(7));
plot Lower_Band = average[-displace] - shift[-displace];
Lower_Band.SetDefaultColor(GetColor(7));
plot Upper_Band2 = average[-displace] + shift2[-displace];
Upper_Band2.SetDefaultColor(GetColor(7));
plot Lower_Band2 = average[-displace] - shift2[-displace];
Lower_Band2.SetDefaultColor(GetColor(7));
plot Upper_Band3 = average[-displace] + shift3[-displace];
Upper_Band3.SetDefaultColor(GetColor(7));
plot Lower_Band3 = average[-displace] - shift3[-displace];
Lower_Band3.SetDefaultColor(GetColor(7));

Edited by fxuser1
code
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...