getting only positive value's - EasyLanguage Programming | futures io social day trading
futures io futures trading


getting only positive value's
Updated: Views / Replies:220 / 6
Created: by spajansen 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
 

getting only positive value's

  #1 (permalink)
Elite Member
Arnhem , the Netherlands
 
Futures Experience: Beginner
Platform: TRADESTATION
Broker/Data: Tradestation
Favorite Futures: NQ
 
Posts: 7 since Feb 2017
Thanks: 4 given, 1 received

getting only positive value's

hi dudes amd dudettes,

i'm fairly new to easylanguage and i'm trying to get the smallest POSITIVE value out of a list.

i'm aware of minlist, maxlist, absvalue, pos and min but i'm still stuck.

for example: for the list -1, -2, 1, 3 the favored output should be 1.

who can steer me in the right direction??


Last edited by spajansen; July 30th, 2017 at 03:15 PM.
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.

 
  #3 (permalink)
 Vendor: www.orderflowdashpro.com 
North Carolina
 
Futures Experience: Beginner
Platform: NinjaTrader, Tradestation
Favorite Futures: es
 
Posts: 225 since Nov 2011
Thanks: 52 given, 211 received


One simple way is not to store any negative values in the list. If you need the negative values for another purpose, create an additional array variable. See the psuedo code at below:

 
Code
If (x< 0) then skip
Your other most straightforward option is to read each item in the list using a for loop. Additionally, you could simply keep a running track of the smallest item thereby not requiring any search at all.


 
Code
y = x >= 0 and x < y: x, y

Reply With Quote
 
  #4 (permalink)
Elite Member
Arnhem , the Netherlands
 
Futures Experience: Beginner
Platform: TRADESTATION
Broker/Data: Tradestation
Favorite Futures: NQ
 
Posts: 7 since Feb 2017
Thanks: 4 given, 1 received

hi,
i was hoping this to be posible without the use of an array.
i have never build an array.....
the values i am storing are fixed (floor pivots) and i want to find the one that is the closed below the current price.

Reply With Quote
 
  #5 (permalink)
 Vendor: www.orderflowdashpro.com 
North Carolina
 
Futures Experience: Beginner
Platform: NinjaTrader, Tradestation
Favorite Futures: es
 
Posts: 225 since Nov 2011
Thanks: 52 given, 211 received

Arrays aren't very difficult to use: you might look into them. However, if you want to avoid an array and only have a few items you can use the code below which is basically implementation of pseudo method shown above:

 
Code
Once begin
Value10 = -1;  // This can be used as a check to see if any positive value was found
end;

Value10 = iff(Value1 >= 0 and value1 < value10, value1,value10);
Value10 = iff(Value2 >= 0 and value2 < value10, value2,value10);

Reply With Quote
The following user says Thank You to tpredictor for this post:
 
  #6 (permalink)
Elite Member
Arnhem , the Netherlands
 
Futures Experience: Beginner
Platform: TRADESTATION
Broker/Data: Tradestation
Favorite Futures: NQ
 
Posts: 7 since Feb 2017
Thanks: 4 given, 1 received

thank you,
it dowsnt look pretty but it seems to work


 
Code
vars: piv1(0),piv2(0),piv3(0),piv4(0),piv5(0),piv6(0),piv7(0),piv8(0),piv9(0),piv10(0),piv11(0),piv12(0),piv13(0);
	
piv1 = iff((L-pp)>0,(L-PP), 99999);
piv2 = iff((L-rr1)>0,(L-rr1), 99999);
piv3 = iff((L-rr2)>0,(L-rr2), 99999);
piv4 = iff((L-rr3)>0,(L-rr3), 99999);
piv5 = iff((L-ss1)>0,(L-ss1), 99999);
piv6 = iff((l-ss2)>0,(L-ss2), 99999);
piv7 = iff((l-ss3)>0,(l-ss3), 99999);
piv8 = iff((L-m0)>0,(L-M0), 99999);
piv9 = iff((l-m1)>0,(l-m1), 99999);
piv10 = iff((l-m2)>0,(l-m2), 99999);
piv11 = iff((L-m3)>0,(L-M3), 99999);
piv12 = iff((l-m4)>0,(l-m4), 99999);
piv13 = iff((l-m5)>0,(l-m5), 99999);
	
	
closestpivot_l  =L -(Minlist(piv1,piv2,piv3,piv4,piv5,piv6,piv7,piv8,piv9,piv10,piv11,piv12,piv13))

Reply With Quote
 
  #7 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,431 since Apr 2013
Thanks: 222 given, 818 received

spajansen,

pretty is in the eye of the beholder - if it works for you, great.

If you want to create it more efficient you can take a look at a "for loop" (as @tpredictor mentioned) and the "switch" statement and combine them (basically loop from 0 to 12 and have the switch statement return the corresponding pivot to your current loop count) - you don't even have to use an array in that approach, just one variable that holds your current pivot (within the loop) and one variable that holds the current smallest positive value.

Regards,

ABCTG

Reply With Quote

Reply



futures io > > > > > getting only positive value's

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Battlestations: Show us your trading desks and win $750 in prizes

August
 

Ask Me Anything (AMA) w/Rod Casilli @ Collective2

Aug 23
 

Prototyping Python Strategies (part 3, Live Trading) w/Ran Aroussi [1PM ET]

Elite only
 

Develop Strategies and Perfect Execution w/Brannigan Barrett @ Axia Futures

Elite only

Introduction to Phillip Capital futures brokerage services

Aug TBD

How Monte Carlo Analysis Can Help Your Trading w/Kevin Davey

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Positive expectancy calculation grego Psychology and Money Management 2 September 22nd, 2016 05:00 AM
Positive Divergence steve2222 Terms (Glossary) 0 February 2nd, 2016 03:34 PM
If Equity positive then.. robz75 EasyLanguage Programming 12 September 15th, 2014 03:57 PM
Positive Balance gretaro Elite Trading Journals 21 August 22nd, 2013 12:37 PM


All times are GMT -4. The time now is 03:20 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-08-23 in 0.06 seconds with 18 queries on phoenix via your IP 54.80.198.222