NexusFi: Find Your Edge


Home Menu

 





Help With An EL Learning Exercise


Discussion in EasyLanguage Programming

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




 
Search this Thread

Help With An EL Learning Exercise

  #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?
MC PL editor upgrade
MultiCharts
Exit Strategy
NinjaTrader
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
26 thanks
Diary of a simple price action trader
26 thanks
Tao te Trade: way of the WLD
23 thanks
My NQ Trading Journal
16 thanks
HumbleTraders next chapter
9 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:	154
Size:	52.6 KB
ID:	204369   Click image for larger version

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

TrendFirst,

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

Regards,

ABCTG

Follow me on Twitter 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,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

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 Twitter Reply With Quote
Thanked by:




Last Updated on March 19, 2016


© 2024 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 - Privacy Policy - Downloads - Top
no new posts