NexusFi: Find Your Edge


Home Menu

 





Need Indicator Help Assigning A Value


Discussion in EasyLanguage Programming

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




 
Search this Thread
  #1 (permalink)
Joe50
HONOLULU
 
Posts: 23 since Feb 2019
Thanks Given: 6
Thanks Received: 3

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 NexusFi?
Trump Media to sell instant access to market-moving soci …
Traders Hideout
Datafeed for Atas
Platforms and Indicators
EA
Platforms and Indicators
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
My Rant with AMP Futures
Trading Reviews and Vendors
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Mes vs MNQ
6 thanks
NexusFi site changelog and issues/problem reporting
5 thanks
BERN ALGOS algo trading journal
3 thanks
Johnnys Journal
2 thanks
TopStep Trader disappointment
2 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643


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 X Reply With Quote
  #4 (permalink)
Joe50
HONOLULU
 
Posts: 23 since Feb 2019
Thanks Given: 6
Thanks Received: 3

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)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

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 X Reply With Quote
Thanked by:
  #6 (permalink)
Joe50
HONOLULU
 
Posts: 23 since Feb 2019
Thanks Given: 6
Thanks Received: 3

OK , I'll mess around with it.

Possible time > 1200 or >=1205

Thank You


Reply With Quote
  #7 (permalink)
Joe50
HONOLULU
 
Posts: 23 since Feb 2019
Thanks Given: 6
Thanks Received: 3

Ok Got it !

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


Reply With Quote
  #8 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

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 X Reply With Quote




Last Updated on July 8, 2019


© 2026 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 - Downloads - Top
no new posts