Plz help me translate this wonderful line in muliticharts ~ - EasyLanguage Programming | futures.io
futures.io futures trading


Plz help me translate this wonderful line in muliticharts ~
Started: by uu04536 Views / Replies:150 / 1
Last Reply: Attachments:0

Welcome to futures.io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • 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, and we will never resell your private information.

-- Big Mike

Reply
 
Thread Tools Search this Thread
 

Plz help me translate this wonderful line in muliticharts ~

  #1 (permalink)
Trading Apprentice
NN China
 
Futures Experience: Master
Platform: TradeStation
Favorite Futures: Gold FX
 
Posts: 1 since Oct 2016
Thanks: 0 given, 0 received

Plz help me translate this wonderful line in muliticharts ~

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() {
IndicatorBuffers(1);
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;
}
C++;
}
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 stop....so how to translate this into Multicharts ? (if i replace the C<= Ha to j >=0 ?) thx !
thx

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.


Reply



futures.io > > > > > Plz help me translate this wonderful line in muliticharts ~

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

2016 True Edge Awards: Voting is open until Jan 21!

Now
 

Bookmap New Indicator Panel, Cumulative Delta, Order Flow demo

Jan 17
 

An Afternoon with FIO member Massive l

Elite only

Leo Murphy: Making sense of Technical Analysis and Random Walk

Elite only
 

FuturesTrader71: Ask Me Anything

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Single line script translate please~~ KFurious NinjaTrader Programming 7 October 8th, 2015 12:51 AM
Help plz with Gom setup :( Warlock186 NinjaTrader 1 September 9th, 2014 01:27 PM
A little programming help plz mpe66 NinjaTrader Programming 31 July 27th, 2011 10:16 AM
HELP with understanding this FORMULA plz.... mdsvtr Currency Futures 1 February 11th, 2011 10:11 PM
HELP with RECOMMENDING a Ninja Script Consultant plz... mdsvtr Vendors and Product Reviews 3 November 6th, 2010 11:12 AM


All times are GMT -4. The time now is 09:46 PM.

no new posts
Page generated 2017-01-17 in 0.07 seconds with 19 queries on phoenix via your IP 54.146.139.201