NexusFi: Find Your Edge


Home Menu

 





average


Discussion in EasyLanguage Programming

Updated
    1. trending_up 1,104 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 6 posts
    2. attach_file 0 attachments




 
Search this Thread

average

  #1 (permalink)
capper
bergamo
 
Posts: 7 since Apr 2016
Thanks Given: 0
Thanks Received: 2

hi, i need to create two average in tradestation of open - low of last 4 bars with up close and the second of high - open with down close.
somebody can help me ?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Increase in trading performance by 75%
The Elite Circle
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
30 thanks
Spoo-nalysis ES e-mini futures S&P 500
28 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
16 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627


capper,

I must admit that I am not sure what exactly you are trying to compute. Maybe you can elaborate a bit on what exactly you want to compute, maybe even with a an example?

When you say "open - low of last 4 bars with up close", how does the up close go into the formula?

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #4 (permalink)
capper
bergamo
 
Posts: 7 since Apr 2016
Thanks Given: 0
Thanks Received: 2


ABCTG View Post
capper,

I must admit that I am not sure what exactly you are trying to compute. Maybe you can elaborate a bit on what exactly you want to compute, maybe even with a an example?

When you say "open - low of last 4 bars with up close", how does the up close go into the formula?


Regards,

ABCTG



Up close is close > open and I don't know how to insert this condition in the average

Reply With Quote
Thanked by:
  #5 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

capper,

thank you for the clarification. I don't think you can use the built in average function simply because you can't use every bar, but you'll have to skip bars in between.

The easiest approach will likely be to use an array and store the last 4 bars (or however many you want it to store).
With that you can compute your own average over all values within the array.

You will need a counter that tracks at which position you are currently at within the array and when you have stored 4 values, you will have to start back over and overwrite the first stored value with the new value etc..
This way you'll ensure to only hold the recent 4 values.

This is not too hard to accomplish, but it will require a little bit of coding.

Regards,

ABCTG



capper View Post
Up close is close > open and I don't know how to insert this condition in the average


Follow me on Twitter Reply With Quote
  #6 (permalink)
capper
bergamo
 
Posts: 7 since Apr 2016
Thanks Given: 0
Thanks Received: 2


ABCTG View Post
capper,

thank you for the clarification. I don't think you can use the built in average function simply because you can't use every bar, but you'll have to skip bars in between.

The easiest approach will likely be to use an array and store the last 4 bars (or however many you want it to store).
With that you can compute your own average over all values within the array.

You will need a counter that tracks at which position you are currently at within the array and when you have stored 4 values, you will have to start back over and overwrite the first stored value with the new value etc..
This way you'll ensure to only hold the recent 4 values.

This is not too hard to accomplish, but it will require a little bit of coding.

Regards,

ABCTG

Ok thanks, but can you help me with some code or do you know if there is a guide for this ?

Reply With Quote
  #7 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

capper,

I'll gladly steer you in the right direction or help you with your code if you post it. If you follow the plan I outlined, you should be able to accomplish what you have in mind.

Not knowing your programming skill level, the Easylanguage Essentials PDF might be a good start.

Regards,

ABCTG

Follow me on Twitter Reply With Quote




Last Updated on April 15, 2016


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts