Holding A Value - futures io
futures io futures trading



Holding A Value


Discussion in EasyLanguage Programming

Updated by Joe50
      Top Posters
    1. looks_one Joe50 with 5 posts (0 thanks)
    2. looks_two ABCTG with 3 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 kjhosken with 1 posts (0 thanks)
    1. trending_up 760 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 9 replies
    2. attach_file 0 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)

 
Thread Tools Search this Thread
 

Holding A Value

  #1 (permalink)
HONOLULU
 
 
Posts: 23 since Feb 2019
Thanks: 6 given, 3 received

Holding A Value

Hi,

I am using Tradestation 2000i which is similar to the newer versions.

Anyway, this is what I am trying to do:

I created a script where

If X = 3 then Begin

HP = High
LP = Low

end;

IF X > 3 Then Begin

Value1 = IFF (High > HP, 1,0);
Value2 = IFF (Low < LP,-1,0);

End;

How do you code the following:

If Value1 = 1 then Begin

HP2 = High

If Value2 = -1 then Begin

LP2 = Low

end;
end;

What I am trying to do is capture the high and low price of the exact moment when value1 and value2 occur. How is this done ?

Thankyou to all who reads this.

Reply With Quote

Can you help answer these questions
from other members on futures io?
Convert NinjaTrader NT7 indicator to Tradestation EasyLanguage and RADARSCREEN
Platforms and Indicators
Issue meeting order entry conditions
Elite Automated NinjaTrader Trading
Last 5 minutes Label
ThinkOrSwim
Moving average with Lag reduction
NinjaTrader
Linux?
ThinkOrSwim
 
Best Threads (Most Thanked)
in the last 7 days on futures io
FIO Journal Challenge - June 2020 edition w/SharkIndicators
59 thanks
Spoo-nalysis ES e-mini futures S&P 500
55 thanks
June Charity Fundraiser - Feeding hungry families
51 thanks
Fixed vs trailing stops
28 thanks
AMP Futures / AMP Global Review
27 thanks
 
  #3 (permalink)
Seattle, WA/USA
 
Experience: Intermediate
Platform: TOS, TS
Trading: Forex, crude
 
Posts: 78 since Sep 2016
Thanks: 7 given, 27 received


There's probably better ways to do it but maybe try something like this:
if (value1 = 1 and value1[1] = 0) then HP2= high else hp2 = hp2[1];

Bare in mind if you are looking for the exact moment that value1 turns true it's exactly when high > hp, therefore hp2 will be just 1 tick higher than hp

Follow me on Twitter Reply With Quote
 
  #4 (permalink)
HONOLULU
 
 
Posts: 23 since Feb 2019
Thanks: 6 given, 3 received

Oh , I see what you are doing. Smart. Let me mess with this and see what happens.

Thankyou for your reply !

Reply With Quote
 
  #5 (permalink)
Hamburg Germany
 
Experience: Advanced
Platform: Multicharts, Tradestation
Broker: DTN IQ
Trading: ES
 
Posts: 2,178 since Apr 2013
Thanks: 384 given, 1,411 received

Joe50,

you could also do this within the following block. Instead of using IFF you could use a regular if... then begin statement and store a value in a variable when the condition you check for is true.

 
Code
IF X > 3 Then Begin

Value1 = IFF (High > HP, 1,0);
Value2 = IFF (Low < LP,-1,0);

End;
Regards,

ABCTG


Joe50 View Post
Oh , I see what you are doing. Smart. Let me mess with this and see what happens.

Thankyou for your reply !


Follow me on Twitter Visit my Facebook Reply With Quote
 
  #6 (permalink)
HONOLULU
 
 
Posts: 23 since Feb 2019
Thanks: 6 given, 3 received

Hi ABCTG,


Thankyou always taking the time to reply to me !

OK, That is good to know. I am trying to figure out how to get the HHV/LLV between the two values HP and LP.

Do you think that would work using HHV or LLV ?


Thankyou for the clue !

Reply With Quote
 
  #7 (permalink)
Hamburg Germany
 
Experience: Advanced
Platform: Multicharts, Tradestation
Broker: DTN IQ
Trading: ES
 
Posts: 2,178 since Apr 2013
Thanks: 384 given, 1,411 received

Joe50,

depends on what you mean with HHV/LLV.

Regards,

ABCTG


Joe50 View Post
Hi ABCTG,


Thankyou always taking the time to reply to me !

OK, That is good to know. I am trying to figure out how to get the HHV/LLV between the two values HP and LP.

Do you think that would work using HHV or LLV ?


Thankyou for the clue !


Follow me on Twitter Visit my Facebook Reply With Quote
 
  #8 (permalink)
HONOLULU
 
 
Posts: 23 since Feb 2019
Thanks: 6 given, 3 received

Hello ABCTG,

Thankyou for your reply.

The Highest High if Value1 = 1 and Value2 = 0 or the Lowest Low if Value1 = 0 and value 2 = -1.

Reply With Quote
 
  #9 (permalink)
Hamburg Germany
 
Experience: Advanced
Platform: Multicharts, Tradestation
Broker: DTN IQ
Trading: ES
 
Posts: 2,178 since Apr 2013
Thanks: 384 given, 1,411 received

Joe50,

you can use a new variable and when ever High > HP you would check if the High is also higher than this new variable and if it is update it to the new higher high. Depending on your intentions it could also make sense to reset this new variable to High at "If X = 3", too.

Regards,

ABCTG



Joe50 View Post
Hello ABCTG,

Thankyou for your reply.

The Highest High if Value1 = 1 and Value2 = 0 or the Lowest Low if Value1 = 0 and value 2 = -1.


Follow me on Twitter Visit my Facebook Reply With Quote
 
  #10 (permalink)
HONOLULU
 
 
Posts: 23 since Feb 2019
Thanks: 6 given, 3 received


Hello ABCTG,

OK, I will try this. I'll see what happens.

Thank You Again !

Reply With Quote



futures io Trading Community Platforms and Indicators EasyLanguage Programming > Holding A Value




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