Traderji.com - Discussion forum for Stocks Commodities & Forex

pivots used by Thomas DeMark

Discuss pivots used by Thomas DeMark at the AmiBroker within the Traderji.com - Discussion forum for Stocks Commodities & Forex; Dear all.. is there one of you to help me to rewrite this Metatrader formula ...


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

Notices


Advertise Here

Reply
 
Thread Tools
Sponsored Links
  #1  
Old 1st September 2008, 02:20 AM
Member
 
Join Date: Jul 2008
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
abdulazizmr is on a distinguished road
Reputation: 11
Default pivots used by Thomas DeMark

Dear all.. is there one of you to help me to rewrite this Metatrader formula to Amibroker.... Thanks in advace




//+------------------------------------------------------------------+
//| DialyPivot.mq4 |
//| These are the main pivots used by Thomas DeMark |
//| Written by: Ice |
//| |
//+------------------------------------------------------------------+
#property copyright "2005 Free software for trader"

#property indicator_chart_window
#property indicator_buffers 7

#property indicator_color1 Blue
#property indicator_color2 Yellow
#property indicator_color3 Red
#property indicator_color4 Green
#property indicator_color5 Lime

//---- input parameters\

datetime BT[];
double YesterdayHigh[50];
double YesterdayLow[50];
double YesterdayClose[50];
//---- buffers

double PivotArray[];
double R1Array[];
double S1Array[];
double R2Array[];
double S2Array[];
double R3Array[];
double S3Array[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
// Pivot
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,PivotArray);
IndicatorShortName("TDPivot");
SetIndexLabel(0,"Pivot");

// Resistance 1
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,R1Array);
SetIndexLabel(1,"R1");

// Support 1
SetIndexStyle(2,DRAW_LINE);
SetIndexBuffer(2,S1Array);
SetIndexLabel(2,"R1");

// Resistance 2
SetIndexStyle(3,DRAW_LINE);
SetIndexBuffer(3,R2Array);
SetIndexLabel(3,"R2");

// Support 2
SetIndexStyle(4,DRAW_LINE);
SetIndexBuffer(4,S2Array);
SetIndexLabel(4,"S2");


return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();

ArrayResize(BT, Bars); Print("Bars = " + Bars);
// Fill BT with bar open TIME
ArrayCopySeries(BT, MODE_TIME);
// Fill temp arrays with High, Low and Close prices per day
ArrayCopySeries(YesterdayHigh, MODE_HIGH, Symbol(), PERIOD_D1);
ArrayCopySeries(YesterdayLow, MODE_LOW, Symbol(), PERIOD_D1);
ArrayCopySeries(YesterdayClose, MODE_CLOSE, Symbol(), PERIOD_D1);

int od = 0;
int dd = 0;


double Pivot;
double R1;
double S1;
double R2;
double S2;

//Cycle through all the bars and fill the indicator bars with the Pivot point values
for (int i = 0; i <= Bars; i++) {
if (TimeDay(BT[i]) != od) {
dd++;
Pivot = (YesterdayHigh[dd] + YesterdayLow[dd] + YesterdayClose[dd])/3;
R1 = (2*Pivot)-YesterdayLow[dd];
S1 = (2*Pivot)-YesterdayHigh[dd];
R2 = Pivot-S1+R1;
S2 = Pivot-R1+S1;
od = TimeDay(BT[i]);
}

PivotArray[i] = Pivot;
R1Array[i]=R1;
S1Array[i]=S1;
R2Array[i]=R2;
S2Array[i]=S2;
}
//----
return(0);
}
//+------------------------------------------------------------------+
Reply With Quote
The Following User Says Thank You to abdulazizmr For This Useful Post:
HBBHVN (6th September 2008)
Sponsored Links
  #2  
Old 1st September 2008, 08:18 AM
Member
 
Join Date: Apr 2007
Posts: 709
Thanks: 87
Thanked 98 Times in 44 Posts
chintan786 will become famous soon enoughchintan786 will become famous soon enough
Reputation: 127
Default Re: pivots used by Thomas DeMark

Hi Abdul.. can u upload a pic of this indicator.... looks like some Pivot point play....if it is tht then i have one afl.

chintan786
Reply With Quote
  #3  
Old 1st September 2008, 08:20 AM
Member
 
Join Date: Mar 2008
Posts: 385
Thanks: 134
Thanked 179 Times in 75 Posts
vvvv has a spectacular aura aboutvvvv has a spectacular aura about
Reputation: 189
Default Re: pivots used by Thomas DeMark

go to amibroker.com & search for demark pivots..its there...i feel the metatrader one is wrong...
Reply With Quote
  #4  
Old 2nd September 2008, 08:31 AM
Member
 
Join Date: Jul 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Paglas is on a distinguished road
Reputation: 10
Default Re: pivots used by Thomas DeMark

Quote:
Originally Posted by vvvv View Post
go to amibroker.com & search for demark pivots..its there...i feel the metatrader one is wrong...

tHANKS DEMARK PIVOTS IS WORKING
Reply With Quote
  #5  
Old 2nd October 2008, 12:21 AM
Member
 
Join Date: Oct 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
ruhul_03 is on a distinguished road
Reputation: 10
Default Re: pivots used by Thomas DeMark

Quote:
Originally Posted by vvvv View Post
go to amibroker.com & search for demark pivots..its there...i feel the metatrader one is wrong...
hi, i am new member
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:47 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