Highest high for specific bars - easylanguage code suggestion - futures io
futures io futures trading



Highest high for specific bars - easylanguage code suggestion


Discussion in EasyLanguage Programming

Updated by ABCTG
      Top Posters
    1. looks_one ABCTG with 11 posts (2 thanks)
    2. looks_two cactus1973 with 10 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 edgefirst with 1 posts (1 thanks)
    1. trending_up 1,950 views
    2. thumb_up 5 thanks given
    3. group 6 followers
    1. forum 24 replies
    2. attach_file 3 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

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

 
Search this Thread
 

Highest high for specific bars - easylanguage code suggestion

(login for full post details)
  #1 (permalink)
Canicattė Italy
 
 
Posts: 15 since Nov 2018
Thanks: 0 given, 0 received

Hello, everyone,
I am not very experienced with easylanguage, I have difficulty in coding the command to find highest (high, 5) only among the previous bars that have a minimum lower than the level x.

I hope I have explained well, I also enclose an image for more clarity. The result should return the maximum of bar A.

Anyone have any suggestions?

Thank you in advance

Gioak

Attached Thumbnails
Click image for larger version

Name:	B.png
Views:	36
Size:	28.2 KB
ID:	262400  
Reply With Quote

Can you help answer these questions
from other members on futures io?
Volume Chart Trend Lines
TradeStation
Data Feed sharing possible between TS/IB and 3rd party apps?
Platforms and Indicators
Linear Regression Slope Indicator
TradeStation
GGP straightforward North?
Stocks and ETFs
Options Backtesting Software with Market Replay tool/feature?
Options
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Are sharks watching on the other side?
52 thanks
Sierra Chart ACSIL for Beginners.
27 thanks
Earn2Trade (Helios) - "The Gauntlet"
21 thanks
VWAP for stock index futures trading?
19 thanks
FIO Journal Challenge - June 2020 w/SharkIndicators
14 thanks
 
(login for full post details)
  #3 (permalink)
Hamburg Germany
 
Experience: Advanced
Platform: Multicharts, Tradestation
Broker: DTN IQ
Trading: ES
 
Posts: 2,185 since Apr 2013
Thanks: 384 given, 1,421 received


Hi Gioak,

I would suggest looking into the "for loop" as you will have to cycle through the previous bars and only include those that are lower than X in your tracking of the highest high.

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote
 
(login for full post details)
  #4 (permalink)
Canicattė Italy
 
 
Posts: 15 since Nov 2018
Thanks: 0 given, 0 received

Yes, but unfortunately I don't know how to select only the bars with the minimum lower than x.

Gioak

Reply With Quote
 
(login for full post details)
  #5 (permalink)
Hamburg Germany
 
Experience: Advanced
Platform: Multicharts, Tradestation
Broker: DTN IQ
Trading: ES
 
Posts: 2,185 since Apr 2013
Thanks: 384 given, 1,421 received

Hi Gioak,

post the code you have for the loop and I am sure someone can point you in the right direction.

You might want to take a look at the free EasyLanguage Essentials PDF that you can find on the net. It will explain the basis and cover loops, too.

Regards,

ABCTG


cactus1973 View Post
Yes, but unfortunately I don't know how to select only the bars with the minimum lower than x.

Gioak


Follow me on Twitter Visit my Facebook Reply With Quote
 
(login for full post details)
  #6 (permalink)
Canicattė Italy
 
 
Posts: 15 since Nov 2018
Thanks: 0 given, 0 received

HI ABCTG,

Thanks for your suggestions, I'll try to examine the free EasyLanguage Essentials PDF.

The code should be something like this:

Var: x(0), y(0);
For x = 1 to 5 and for y = 5 downto 1 begin

IF L [x] < x and H [x] = highest(high,y) then A = H [x] ;
end;

The problem is that I can't find the highest(high) only among the bars that have a minimum < than x.

Regards
Gioak

Reply With Quote
 
(login for full post details)
  #7 (permalink)
Hamburg Germany
 
Experience: Advanced
Platform: Multicharts, Tradestation
Broker: DTN IQ
Trading: ES
 
Posts: 2,185 since Apr 2013
Thanks: 384 given, 1,421 received

Hi Gioak,

you can access the value for some reserved words like High by using a number within square brackets. Where the number specifies how many bars back from the currently processed bar you want to look at (while 0 is the most recent bar). Then you can compare this High and check it it matches your condition and only store it within a variable if it matches your condition and is higher than the currently stored value within the variable.

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote
 
(login for full post details)
  #8 (permalink)
Canicattė Italy
 
 
Posts: 15 since Nov 2018
Thanks: 0 given, 0 received

HI ABCTG,
thanks for the suggestions, my difficulty is in finding the correct criterion to distinguish first only the bars that have a minimum of less than x and then be able to find among them (only among them) the bar with the highest max.

Regards
Gioak

Reply With Quote
 
(login for full post details)
  #9 (permalink)
Hamburg Germany
 
Experience: Advanced
Platform: Multicharts, Tradestation
Broker: DTN IQ
Trading: ES
 
Posts: 2,185 since Apr 2013
Thanks: 384 given, 1,421 received

cactus1973,

I would suggest to start simple. Create a loop that simply finds the highest high over the last X bars, without using the highest high function. You would use a variable to store the highest high within the loop in, by checking if the High for the bar you are currently looking at is higher than the value stored in the variable. If it is, you update the variable, if if's not, you do nothing. The only thing to add would be to reset the variable each time before you start with the loop (for example by setting the variable value to -999999 to ensure that it can be updated to a new high and that you don't store old information in the variable).

Regards,

ABCTG


cactus1973 View Post
HI ABCTG,
thanks for the suggestions, my difficulty is in finding the correct criterion to distinguish first only the bars that have a minimum of less than x and then be able to find among them (only among them) the bar with the highest max.

Regards
Gioak


Follow me on Twitter Visit my Facebook Reply With Quote
The following user says Thank You to ABCTG for this post:
 
(login for full post details)
  #10 (permalink)
Canicattė Italy
 
 
Posts: 15 since Nov 2018
Thanks: 0 given, 0 received


HI ABCTG,
I think that highest high of x bars back is not useful, you don't need to know highest high unless it has a minimum lower than x.
Infact what you need to know with a loop from 0 to 5 is which lows are lower than X and then among them which one has the highest maximum, it will be A like pic. Between the 5 bars back there could be a higher high than A but if it doesn't have a minimum lower than x I don't care.

Regards,

Gioak

Attached Thumbnails
Click image for larger version

Name:	abc.jpg
Views:	18
Size:	85.3 KB
ID:	262711  
Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > Highest high for specific bars - easylanguage code suggestion


March 1, 2019


Upcoming Webinars and Events
 

Free BloodHound Licenses for everyone!

June
 

Every journal equals ten meals for the hungry

June
     



Copyright © 2020 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