Trading Articles
Article Categories
Article Tools
Code TRX Channel for TOS (MT4 Code here)
Updated October 1, 2014
trending_up
1,335 views
thumb_up
0 thanks given
group
1 followers
forum
0 posts
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)
Code TRX Channel for TOS (MT4 Code here)
(login for full post details)
#1 (permalink )
kazan russia
Posts: 8 since Aug 2014
Thanks: 0 given,
1
received
Guys,
Anyone could convert this TRX channel into TOS please?
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 Blue
#property indicator_color2 White
#property indicator_color3 Red
double g_ibuf_76[];
double g_ibuf_80[];
double g_ibuf_84[];
int g_period_88 = 20;
int init() {
SetIndexStyle(0, DRAW_LINE);
SetIndexShift(0, 0);
SetIndexDrawBegin(0, 0);
SetIndexBuffer(0, g_ibuf_76);
SetIndexStyle(1, DRAW_NONE);
SetIndexShift(1, 0);
SetIndexDrawBegin(1, 0);
SetIndexBuffer(1, g_ibuf_80);
SetIndexStyle(2, DRAW_LINE);
SetIndexShift(2, 0);
SetIndexDrawBegin(2, 0);
SetIndexBuffer(2, g_ibuf_84);
return (0);
}
int deinit() {
return (0);
}
int start() {
double ld_8;
if (ObjectType("TRX") != 23) ObjectDelete("TRX");
if (ObjectFind("TRX") == -1) ObjectCreate("TRX", OBJ_LABEL, 0, Time[5], Close[5]);
ObjectSetText("TRX", "Launcher TRX Indicator (R)");
ObjectSet("TRX", OBJPROP_CORNER, 4);
ObjectSet("TRX", OBJPROP_FONTSIZE, 12);
ObjectSet("TRX", OBJPROP_XDISTANCE, 5);
ObjectSet("TRX", OBJPROP_YDISTANCE, 20);
int li_4 = IndicatorCounted();
if (li_4 < 0) return (-1);
if (li_4 > 0) li_4--;
int li_0 = Bars - li_4;
for (int li_16 = 0; li_16 < li_0; li_16++) {
g_ibuf_80[li_16] = iMA(NULL, 0, g_period_88, 0, MODE_SMA, PRICE_TYPICAL, li_16);
ld_8 = findAvg(g_period_88, li_16);
g_ibuf_76[li_16] = g_ibuf_80[li_16] + 1.5 * ld_8;
g_ibuf_84[li_16] = g_ibuf_80[li_16] - 1.5 * ld_8;
}
double l_iatr_20 = iATR(Symbol(), 0, 50, 1);
if (High[0] == Low[0] && High[0] == Close[0] && High[0] == Open[0]) {
if (MathAbs(High[1] - g_ibuf_76[1]) < l_iatr_20 && g_ibuf_76[1] < g_ibuf_76[2]) Alert("[" + Symbol() + "] Possible Short on TRX Final, Please Confirm with Directional.");
if (MathAbs(Low[1] - g_ibuf_84[1]) < l_iatr_20 && g_ibuf_84[1] > g_ibuf_84[2]) Alert("[" + Symbol() + "] Possible Long on TRX Final, Please Confirm with Directional.");
}
return (0);
}
double findAvg(int ai_0, int ai_4) {
double ld_ret_8 = 0;
for (int li_16 = ai_4; li_16 < ai_4 + ai_0; li_16++) ld_ret_8 += High[li_16] - Low[li_16];
ld_ret_8 /= ai_0;
return (ld_ret_8);
}
Last Updated on October 1, 2014
Right now
Ongoing
Right now
March
Register to Attend
Elite only
Coming soon
April