Plz help me translate this wonderful line in muliticharts ~ - futures io
futures io futures trading

Plz help me translate this wonderful line in muliticharts ~

Discussion in EasyLanguage Programming

    1. trending_up 589 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 1 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

Plz help me translate this wonderful line in muliticharts ~

(login for full post details)
  #1 (permalink)
NN China
Posts: 1 since Oct 2016
Thanks: 0 given, 0 received

hello ! traders , here is the program (code from MQL4):

#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 LimeGreen
extern int Ha = 61;
double Avg[];

int init() {
Ha = MathMax(Ha, 1);
SetIndexBuffer(0, Avg);
SetIndexDrawBegin(0, Ha);
return (0);
int start() {
int C;
double N1;
double N2;
// main code
int Li_0 = IndicatorCounted();
if (Li_0 < 0) return (-1);
if (Li_0 > 0) Li_0--;
int ak = MathMin(Bars - 1, Bars - Li_0 + Ha);

for (int i = ak; i >= 0; i--) {
N1 = (Ha + 1) * iMA(NULL, 0, 1, 0, MODE_SMA, PRICE_CLOSE, i);
N2 = Ha + 1;
C = 1;
for (int j = Ha; C <= Ha; j--) {
N1 += j * iMA(NULL, 0, 1, 0, MODE_SMA, PRICE_CLOSE, i + C);
N2 += j;
if (C <= i) {
N1 += j * iMA(NULL, 0, 1, 0, MODE_SMA, PRICE_CLOSE, i - C);
N2 += j;
Avg[i] = N1 / N2; //output the line
return (0);

you see. there are two loops inside and keep calculating [iMA....].for the second one it likely never how to translate this into Multicharts ? (if i replace the C<= Ha to j >=0 ?) thx !

Reply With Quote

Can you help answer these questions
from other members on futures io?
Work with historical tcks data on MUltichart NET PowerLa …
Cross border fund flows / fx correlations
Treasury Notes and Bonds
Webinar: Finding your own way in trading w/Adam Grimes
The Elite Circle
Trading Reviews and Vendors
Where can I find Cost to Trade and Book Depth info?
Emini and Emicro Index
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

futures io Trading Community Platforms and Indicators EasyLanguage Programming > Plz help me translate this wonderful line in muliticharts ~

Last Updated on October 2, 2016

Upcoming Webinars and Events

NinjaTrader Indicator Challenge!


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


Importance of Finding Your Own Way w/Adam Grimes

Elite only

Journal Challenge w/Jigsaw


Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
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