Traderji.com - Discussion forum for Stocks Commodities & Forex

I need help regarding Lee Leibfarth's "Trading with an Adaptive Price Zone"

Discuss I need help regarding Lee Leibfarth's "Trading with an Adaptive Price Zone" at the AmiBroker within the Traderji.com - Discussion forum for Stocks Commodities & Forex; I have following program for Lee Leibfarth's "Trading with an Adaptive Price Zone" :- // ...


Go Back   Traderji.com - Discussion forum for Stocks Commodities & Forex > TOOLS & RESOURCES > Software > AmiBroker

Notices


Advertise Here

Reply
 
Thread Tools
Sponsored Links
  #1  
Old 21st September 2008, 07:58 AM
Member
 
Join Date: Apr 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
kmlsoni is on a distinguished road
Reputation: 20
Default I need help regarding Lee Leibfarth's "Trading with an Adaptive Price Zone"

I have following program for Lee Leibfarth's "Trading with an Adaptive Price Zone" :-

// Adaptive Price Zone Indicator & System
////////////////////
function DblSmoothEMA(price,Length)
{
period = IIf (Length < 0, 1, sqrt(Length));
smooth = 2/(period+1);
return AMA(AMA(price,Smooth),smooth);
}

price = ParamField("Price");
period = Param("period", 20, 2, 100);
BandPct = Param("width[%]", 1.4, 0.1, 4, 0.1);

DsEMA = DblSmoothEMA(price,period);
RangeDsEMA = DblsmoothEMA(H-L,period);
Upband = BandPct * RangeDsEMA + DsEMA;
DnBand = DsEMA - BandPct * RangeDsEMA;

Plot(C, "Price", colorBlack, styleBar);
Plot(Upband, "UpBand", colorLightGrey);
Plot(DnBand, "DownBand", colorLightGrey
//you may uncomment lines below to get 'cloud' chart
//if you are using version 4.8 or higher
//PlotOHLC(UpBand, UpBand, DnBand, DnBand, "Band",
//ColorRGB(245,245,255), styleCloud);

SetTradeDelays(1,1,1,1)
ADXThshold = 30;
ADXValue = ADX(14);

Buy = ADXValue <= ADXThshold AND Low <= DnBand;
Short = ADXValue <= ADXThshold AND High <= UpBand;

Sell = Cover = ADXValue > ADXThshold;
if(Status("action") == actionIndicator)
{
Equity(2);
PlotShapes(Buy * shapeUpArrow, colorGreen, 0, DnBand, -24);
PlotShapes(Sell * shapeDownArrow, colorRed, 0, UpBand, -24);
PlotShapes(Short * shapeHollowDownArrow, colorRed, 0, UpBand, -24);
PlotShapes(Cover * shapeHollowUpArrow, colorGreen, 0, DnBand, -24);
}

I got few error messages any one can help me to rectify these error.
Reply With Quote
Sponsored Links
  #2  
Old 21st September 2008, 04:58 PM
Member
 
Join Date: Oct 2007
Posts: 241
Thanks: 10
Thanked 91 Times in 53 Posts
Adheer will become famous soon enoughAdheer will become famous soon enough
Reputation: 111
Default Re: I need help regarding Lee Leibfarth's "Trading with an Adaptive Price Zone"

There are a couple of syntactical errors.

Add the missing code (marked in bold red) to the respective lines in the source code and it should fix the errors.


....
Plot(DnBand, "DownBand", colorLightGrey);
...
...
SetTradeDelays(1,1,1,1);
.....
Reply With Quote
  #3  
Old 22nd September 2008, 07:55 AM
Member
 
Join Date: Apr 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
kmlsoni is on a distinguished road
Reputation: 20
Default Re: I need help regarding Lee Leibfarth's "Trading with an Adaptive Price Zone"

Quote:
Originally Posted by Adheer View Post
There are a couple of syntactical errors.

Add the missing code (marked in bold red) to the respective lines in the source code and it should fix the errors.


....
Plot(DnBand, "DownBand", colorLightGrey);
...
...
SetTradeDelays(1,1,1,1);
.....
Thanks Adheer
Reply With Quote
Sponsored Links

Reply

Bookmarks


Advertise Here


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT +5.5. The time now is 11:36 AM.

Indemnity, Disclaimer & Disclosure Notice:
• By visiting Traderji.com you indicate your acceptance of our Forum Rules Disclaimer & Disclosure and indemnify Traderji.com, its associates and related parties of all claims howsoever resulting from the usage of the forum.
Disclaimer: Trading or investing in stocks & commodities is a high risk activity. Any action you choose to take in the markets is totally your own responsibility. Traderji.com will not be liable for any, direct or indirect, consequential or incidental damages or loss arising out of the use of this information.
Disclosure: The information in this forum is neither an offer to sell nor solicitation to buy any of the securities mentioned herein. The writers may or may not be trading in the securities mentioned.
• All names or products mentioned are trademarks or registered trademarks of their respective owners.
General Content Disclaimer Notice:
In light of our policy of encouraging candid, open exchanges of views and the rapid distribution of information originating from many sources, Traderji.com cannot determine the accuracy of information that may be uploaded to the forum. Opinions, advice and all other information expressed by participants in discussions are those of the author. You rely on such information at your own risk. You are urged to seek professional advice for specific, individual situations and not rely solely on advice or opinions given in the discussions. Since Traderji.com is an open and free discussion forum, any comments made by members of this forum in their posts reflect their own views and not of the owner or administrator of Traderji.com. Thus the owner/administrator indemnify themselves of all claims whatsoever and will not be liable or responsible for any members comments/views in this forum Traderji.com. If you find any objectionable or offensive posts made by members of this forum which you would like to bring to our notice for removal then please Contact Us.
 


Copyright © 2001 - 2008, Traderji.com All Rights Reserved.

Recommended Websites - www.TradersEdgeIndia.com - www.TradingPicks.com - www.MasterOfTrading.com