XAverage array in EasyLanguage - EasyLanguage Programming | futures io social day trading
futures io futures trading


XAverage array in EasyLanguage
Updated: Views / Replies:4,483 / 13
Created: by Big Mike 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
 

XAverage array in EasyLanguage

  #11 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,214 received


ValutaTrader View Post
Ok, I see why we got different results. Your function did not give the correct result on my side, and it is because the array that I tested with had the last price in index 0 and not the other way around. Not sure how to speed up the lookup of the last/max index when the data is stored the other way around.

What method are you using to add values to the array on each bar? The default seems to add to the end of the array, not the beginning.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #12 (permalink)
Elite Member
Oslo,Norway
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: EUR/USD
 
ValutaTrader's Avatar
 
Posts: 66 since Apr 2011
Thanks: 4 given, 50 received

The function that got me started on this, was actually ill written, to some extent, and I could have managed without the array (in that case I put values into it in the wrong order).
So when I was testing the XAverage_a I just made a copy of the price numeric series copying the data into the array for test purposes; and hence getting the 0..N order with 0 being the last. I can see that the normal use of arrays would be to append values at the end of the array at each bar and that would require your function to calc EMA over it.

Reply With Quote
The following user says Thank You to ValutaTrader for this post:
 
  #13 (permalink)
Trading Apprentice
Hong Kong
 
Futures Experience: Advanced
Platform: Multicharts
Favorite Futures: Fores
 
Posts: 2 since Dec 2014
Thanks: 0 given, 0 received

NumericArrayRef


Hi,

I've been looking at how to pass the values of an array out of a function in Multicharts so that it can be used in an indicator. I have read this in the Multicharts Programming Guide;

Usage Example (function named "MaxValArray"):
Input: MyNumericArray[M](NumericArray);
Variable: Result(0);
Result = MyNumericArray[0]; //Reset variable each time.
For Value1 = 1 To M begin
if MyNumericArray[Value1] > Result Then Result = MyNumericArray[Value1];
end;
MaxValArray = Result;

However it seems that we are just passing the value of M to this function. Will the Array MyNumericArray now have values that can be used by the indicator when it calls MaxValArray? I can't seem to get this working and getting

------ Compiled with error(s): ------
Invalid array dimension value.
line -1, column -1

Does anyone have an example of a function that can be called by an indicator where the value of an array can be passed in/out of this function?

Many Thanks

Reply With Quote
 
  #14 (permalink)
Trading Apprentice
new york
 
Futures Experience: None
Platform: metatrader
Favorite Futures: currency futures
 
Posts: 1 since Dec 2015
Thanks: 0 given, 0 received

you should use
"Input: MyNumericArray[10](NumericArray);"
instead of
Input: MyNumericArray[M](NumericArray);

use real number not a variable


dnsarkis View Post
Hi,

I've been looking at how to pass the values of an array out of a function in Multicharts so that it can be used in an indicator. I have read this in the Multicharts Programming Guide;

Usage Example (function named "MaxValArray"):
Input: MyNumericArray[M](NumericArray);
Variable: Result(0);
Result = MyNumericArray[0]; //Reset variable each time.
For Value1 = 1 To M begin
if MyNumericArray[Value1] > Result Then Result = MyNumericArray[Value1];
end;
MaxValArray = Result;

However it seems that we are just passing the value of M to this function. Will the Array MyNumericArray now have values that can be used by the indicator when it calls MaxValArray? I can't seem to get this working and getting

------ Compiled with error(s): ------
Invalid array dimension value.
line -1, column -1

Does anyone have an example of a function that can be called by an indicator where the value of an array can be passed in/out of this function?

Many Thanks


Reply With Quote

Reply



futures io > > > > > XAverage array in EasyLanguage

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Filling an array with all trades done onava EasyLanguage Programming 5 April 27th, 2012 06:10 AM
EasyLanguage vs NinjaScript Traderji Platforms and Indicators 2 October 22nd, 2010 02:00 AM
Two dimensional array in EasyLanguage Big Mike EasyLanguage Programming 6 August 17th, 2010 07:23 PM
Easylanguage vs. C++ Cogito ergo sum EasyLanguage Programming 10 August 2nd, 2010 03:12 PM


All times are GMT -4. The time now is 08:47 PM.

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-10 in 0.08 seconds with 19 queries on phoenix via your IP 54.83.122.227