Need Indicator Help Assigning A Value - futures io
futures io futures trading



Need Indicator Help Assigning A Value


Discussion in EasyLanguage Programming

Updated by ABCTG
    1. trending_up 512 views
    2. thumb_up 1 thanks given
    3. group 1 followers
    1. forum 7 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
 

Need Indicator Help Assigning A Value

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

Need Indicator Help Assigning A Value

Hello,

Thankyou for taking the time to read this and if you can help me that would be great !

I am trying to plot the value 1 if my condition is TRUE or -1 if my condition is false. I have tried for hours upon hours but still have not got it.

Here is what I have:

Inputs: Color(Yellow), Thickness(1);
Variables: HP(0), LP(0), HH(0),LL(0);

IF Time = 1200 Then Begin
HP = high;
LP = low;
Value1 = IFF( High > HP, 1,-1);
{Value2 = IFF( Low < LP, -1,1 );}

End;

Plot1 (Value1);

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
56 thanks
June Charity Fundraiser - Feeding hungry families
51 thanks
Fixed vs trailing stops
28 thanks
AMP Futures / AMP Global Review
27 thanks
 
  #3 (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 evaluate your condition at 1200. At that time your code assigns the value of the reserved word High to your variable HP i.e. HP = High and thus your check for High > HP can never be true at 1200.
Without knowing what exactly you want to check for it's hard to point you into the right direction, but maybe you can elaborate a bit more on the exact condition you want to check for.

Regards,

ABCTG

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

Oooooh I see what you mean.

I am trying to assign a 1 if anytime after 1200 if the high of 1200 bar is exceeded by .01 points ( 1 tick) or a -1 if the low of the 1200 bar is exceeded by .01 points or 1 tick.

Hmmm, I have alot to learn:

Inputs: Color(Yellow), Thicknes(1);
Variables: HP(0), LP(0), HH(0),LL(0);

IF Time = 1200 Then Begin
HP = high;
LP = low;
Value1 = IFF( High +.01 > HP, 1,-1);
Value2 = IFF( Low -.01 < LP, -1,1);

End;

Plot1 (Value1);
Plot2 (Value2);
{Plot3 (0);}

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 evaluate you conditions within a if ... then begin ... end conditional branch i.e. only if Time = 1200 and since you assign High to HP at 1200 and perform your check at 1200 only, your condition High +.01 > HP will always be true.

Depending on the instrument you apply this to you might not need the additional +/-1 0.01, but to achieve what you have in mind the checks need to be moved out of the if Time = 1200 block. Otherwise they won't be evaluated every bar.

Regards,

ABCTG


Joe50 View Post
Oooooh I see what you mean.

I am trying to assign a 1 if anytime after 1200 if the high of 1200 bar is exceeded by .01 points ( 1 tick) or a -1 if the low of the 1200 bar is exceeded by .01 points or 1 tick.

Hmmm, I have alot to learn:

Inputs: Color(Yellow), Thicknes(1);
Variables: HP(0), LP(0), HH(0),LL(0);

IF Time = 1200 Then Begin
HP = high;
LP = low;
Value1 = IFF( High +.01 > HP, 1,-1);
Value2 = IFF( Low -.01 < LP, -1,1);

End;

Plot1 (Value1);
Plot2 (Value2);
{Plot3 (0);}


Follow me on Twitter Visit my Facebook Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #6 (permalink)
HONOLULU
 
 
Posts: 23 since Feb 2019
Thanks: 6 given, 3 received

OK , I'll mess around with it.

Possible time > 1200 or >=1205

Thank You

Reply With Quote
 
  #7 (permalink)
HONOLULU
 
 
Posts: 23 since Feb 2019
Thanks: 6 given, 3 received

Ok Got it !

Thankyou for your input I would have never got it without you !

Reply With Quote
 
  #8 (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 are welcome and thank you for your feedback.

Regards,

ABCTG


Joe50 View Post
Ok Got it !

Thankyou for your input I would have never got it without you !


Follow me on Twitter Visit my Facebook Reply With Quote



futures io Trading Community Platforms and Indicators EasyLanguage Programming > Need Indicator Help Assigning 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