NexusFi: Find Your Edge


Home Menu

 





Help With An EL Learning Exercise


Discussion in EasyLanguage Programming

Updated
    1. trending_up 2,521 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 6 posts
    2. attach_file 2 attachments




 
Search this Thread
  #1 (permalink)
TrendFirst
Calgary AB Canada
 
Posts: 8 since Jan 2016
Thanks Given: 2
Thanks Received: 0

Hi All

I'm starting the process of learning EL and have been watching videos, reading the manuals, and making simple modifications to existing indicators in Multicharts. Most of the mods have gone well, but one is kinda puzzling. I took the Pivot High and Pivot Low indicators and combined them in one script. It works fine for a while, finding and plotting the proper pivots, then at a random moment, the pivots are displaced vertically on the chart. I've attached two images, one shows them working and the other, not.



 
Code
inputs: 
	PriceHi ( High ), 
	PriceLo ( Low ),
	LeftStrength( 3 ), 
	RightStrength( 3 );
	
condition1 = PivotHighVSBar( 1, PriceHi, LeftStrength, RightStrength, RightStrength + 1 ) <> -1 ;
if condition1 then begin
	Plot1[RightStrength]( High[RightStrength], "PivotHi" ) ; 
	once print (PriceHi) ;
	Alert ;
once Print (condition1);
	end
else
	NoPlot( 1 ) ;

condition2 = PivotLowVSBar( 1, PriceLo, LeftStrength, RightStrength, RightStrength + 1 ) <> -1 ;
if condition2 then begin
	Plot2[RightStrength]( Low[RightStrength], "PivotLo" ) ;
	Alert ;
once Print (condition2);
	end
else
	NoPlot( 1 ) ;


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
What we know about Binances $6.3bn hack - BBC News
Cryptocurrency
Index roll effect in corn and wheat: gone, or moved into …
Commodities
Bitcoin’s 2022 low, 2025 high and 2026 low so far arou …
Cryptocurrency
Renko can be the way.
Commodities
Building a free browser DOM/SMC simulator - need some ad …
Platforms and Indicators
 
  #3 (permalink)
TrendFirst
Calgary AB Canada
 
Posts: 8 since Jan 2016
Thanks Given: 2
Thanks Received: 0


Here they are:


Attached Thumbnails
Click image for larger version

Name:	Pivot_Hi_Lo.JPG
Views:	281
Size:	52.6 KB
ID:	204369   Click image for larger version

Name:	Pivot_Hi_Lo2.JPG
Views:	277
Size:	53.1 KB
ID:	204370  
Reply With Quote
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

TrendFirst,

check the last line of your script, you allow the low pivot to remove high pivot plots.

Regards,

ABCTG


Follow me on X Reply With Quote
Thanked by:
  #5 (permalink)
TrendFirst
Calgary AB Canada
 
Posts: 8 since Jan 2016
Thanks Given: 2
Thanks Received: 0


ABCTG View Post
TrendFirst,

check the last line of your script, you allow the low pivot to remove high pivot plots.

Regards,

ABCTG

Ah. I knew it was something silly. Thank you.


Reply With Quote
  #6 (permalink)
TrendFirst
Calgary AB Canada
 
Posts: 8 since Jan 2016
Thanks Given: 2
Thanks Received: 0

One other question.....during debugging I was attempting to print out the pivots. Apparently I don't know how to identify/describe them, because the numbers I was getting were not the same pivots that plotted on the chart. Here is my print statement for the high pivots:

 
Code
Print (condition1);
Print (PivotHi);

Any idea why this wouldn't give the correct pivots?


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

TrendFirst,

in the code you posted there is no variable named PivotHi, so trying to print a non existing variable should result in an error message from the compiler. For the high pivot you can print at the same point where you wrote "once print (PriceHi)", but instead use
 
Code
Print("PivotHi: " + High[RightStrength]);
Regards,

ABCTG


Follow me on X Reply With Quote
Thanked by:




Last Updated on March 19, 2016


© 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