NexusFi: Find Your Edge


Home Menu

 





Help With An EL Learning Exercise


Discussion in EasyLanguage Programming

Updated
    1. trending_up 2,098 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?
The June 15 Resolution Trap: Irans Agreed Text Still Pri …
Prediction Markets & Event Contracts
MyForexFunds Begins Returning Frozen Funds After CFTC Ca …
Funded Trading Evaluation Firms
Rubios Good News Within Hours and the 30-Day Math: Why H …
Prediction Markets & Event Contracts
Sundays Verdict: Lebanon Locked at 99.85% as Iran June 7 …
Prediction Markets & Event Contracts
Trump Truth Social Fires Hormuz From 10% to 59% -- Arsen …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
197 thanks
Sober Journey With S&P
27 thanks
30 Sessions
20 thanks
BERN ALGOS algo trading journal
8 thanks
Volume Indicators
8 thanks
  #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:	243
Size:	52.6 KB
ID:	204369   Click image for larger version

Name:	Pivot_Hi_Lo2.JPG
Views:	240
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,642

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,642

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