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:175 / 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)
 

Spring Grains Outlook w/Sean Lusk @ Walsh Trading

Elite only

FIO Video Journal Challenge featuring NinjaTrader ($2,000+ of prizes)

April

Process above all else w/Anthony Crudele @ Futures Radio Show

Elite only

Machine Learning - Quantitative Trading w/Martin Froehler @ Quantiacs

Elite only

Market Dynamics w/Peter Davies @ Jigsaw Trading

Elite only

Ask Me Anything w/Patrick Rooney @ Trading Technologies

Apr 18

Ask Me Anything w/FuturesTrader71

Apr 19

Machine Learning w/Kris Longmore

Elite only

Market Analysis w/Dave Forss

Apr 25

Introducing iSystems with Stage 5 Trading

Apr 27
     

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


All times are GMT -4. The time now is 05:45 PM.

no new posts
Page generated 2017-03-28 in 0.07 seconds with 19 queries on phoenix via your IP 54.205.60.171