MA into array - MultiCharts | futures io social day trading
futures io futures trading


MA into array
Updated: Views / Replies:754 / 1
Created: by no erocla Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • 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.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

MA into array

  #1 (permalink)
Trading for Fun
turin italy
 
Futures Experience: Advanced
Platform: metatrader multichart
Favorite Futures: futures
 
Posts: 96 since May 2013
Thanks: 43 given, 4 received

MA into array

Hi all, i need help to develop e simple indicator in power language.

I would like to build a For Cycle that return the lowest value between many moving average, i build something like it:

 
Code
                            
var: min(0);
array: 
val[20](0);

For 
value88 1 To 20  begin

value4 
value4+5;
val[value88] = Average(c,value4 );
if (
val[value88]<minthen
min 
val[value88];

End;
plot1(min); 
It should plot just the lowest value between Average(c,5) , average(c,10), average(c,15) etc... but it doesnt work and cycle continue without an end.

Some help about ? thank you very much anyway !

Regards

No Erocla

Reply With Quote
 
  #2 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

no erocla,

you could save a lot of time in your programming (especially when you have to debug code) if you'd use proper
variable names and comments. This makes code much easier to read and is a huge help in case you share code with others (post it on forums for example) or come back to a code after a couple of years.
The code below would do what you requested, but doesn't use an array:


 
Code
Variables:
	ii			(0),
	CurrentMA		(0),
	MALength		(0),
	LowestMAValue		(0);
	
//reset the values before the loop	
LowestMAValue = 999999;
MALength = 0;

//loop through 20 MAs and find the lowest one	
for ii = 1 to 20
begin
	MALength = MALength + 5;
	
	CurrentMA = Average(Close, MALength);
	
	if CurrentMA < LowestMAValue then
		LowestMAValue = CurrentMA;
end;

Plot1(LowestMAValue, "LowestMAValue");
Regards,

ABCTG

Reply With Quote

Reply



futures io > > > > MA into array

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
XAverage array in EasyLanguage Big Mike EasyLanguage Programming 13 December 16th, 2015 09:17 AM
Architecture / Public Array / Instantiate vantojo NinjaTrader Programming 8 November 3rd, 2013 07:06 PM
Filling an array with all trades done onava EasyLanguage Programming 5 April 27th, 2012 06:10 AM
Double MA and Triple MA Script Sadboybh NinjaTrader Programming 8 June 17th, 2011 09:57 AM
Two dimensional array in EasyLanguage Big Mike EasyLanguage Programming 6 August 17th, 2010 07:23 PM


All times are GMT -4. The time now is 02:35 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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
Page generated 2017-12-17 in 0.07 seconds with 19 queries on phoenix via your IP 54.82.56.95