Disliked{quote} Hopefully this is what you are wanting it is hard to tell by your requests. {file} {image}Ignored
main request
Attached File(s)
Say something meaningful or Silence!!
I will code your pivot EAs for no charge 28 replies
I will code your scalping EAs for no charge 163 replies
Oanda MT4 - Indicators and EAs not showing 2 replies
EAs and indicators relating to moutaki... 22 replies
InterbankFX has loaded its MT4 platform with custom EAs, indicators and scripts 1 reply
Disliked{quote} Hopefully this is what you are wanting it is hard to tell by your requests. {file} {image}Ignored
DislikedI would like to request some modification to attached indicator "Quick ZigZag Indi Version" posted by Hayseed. The current version show combined average zig zag length based of a particular time frame on any desired zig zag setting such as 12,5,3 etc. Modification Required 1) Instead of taking zig zag length from beginning, I want an option to see average zig zag length of last 10 swings only. So I need an additional parameter to see # of swings 2) Currently average zig zag length is showing combined average length of both up and down swings, but...Ignored
#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 clrGreen
#property indicator_color2 clrGreen
#property indicator_color3 Magenta
#property indicator_color4 Lime
#property indicator_width3 2
#property indicator_width4 2
#property strict
//----
extern string Bollinger_Band_Settings;
extern int period = 20;
extern int Deviations = 2;
extern string AppliedOptions ="0=Close, 1=Open, 2=High";
extern string AppliedOptions2 ="3=Low, 4=Typical, 5=Weighted Close";
extern int AppliedTo = 4;
extern int Shift = 0;
extern bool ShowBands=true;
extern bool SoundAlert=false;
//----
double upperAbove[];
double upperBelow[];
double downArrow[];
double upArrow[];
//----
int OnInit()
{
IndicatorBuffers(4);
SetIndexBuffer(0,upperAbove);
SetIndexStyle( 0,DRAW_LINE);
SetIndexLabel( 0,"Upper Bollinger Band");
//---
SetIndexBuffer(1,lowerBelow);
SetIndexStyle( 1,DRAW_LINE);
SetIndexLabel( 1,"Lower Bollinger Band");
//----
SetIndexBuffer(2,downArrow);
SetIndexArrow (2,234);
SetIndexStyle( 2,DRAW_ARROW);
SetIndexLabel(2,"Bollinge Band Upper Re-Entry");
//----
SetIndexBuffer(3,upArrow);
SetIndexStyle( 3,DRAW_ARROW);
SetIndexArrow (3,233);
SetIndexLabel(3,"Bollinge Band Lower Re-Entry");
return(INIT_SUCCEEDED);
}
//----
int OnCalculate (const int rates_total, // size of input time series
const int prev_calculated, // bars handled in previous call
const datetime& time[], // Time
const double& open[], // Open
const double& high[], // High
const double& low[], // Low
const double& close[], // Close
const long& tick_volume[], // Tick Volume
const long& volume[], // Real Volume
const int& spread[]) // Spread
{
int counted_bars=IndicatorCounted();
int limit =Bars-counted_bars-1;
Comment(limit);
for(int i = 1;i<limit;i++){
double UPAbove =iCustom(NULL,0,"TAN",20,0,i);
double LOBelow =iCustom(NULL,0,"TAN",20,3,i);
if(ShowBands){
upperAbove[i]=UPAbove;
lowerBelow[i]=LOBelow;
}
if(Close[i+1] > UPAbove){
downArrow[i]= High[i];
if(i==1 && SoundAlert)Alert("Sell Signal");
}
else if(Close[i+1] < LOBelow){
upArrow[i]= Low[i];
if(i==1 && SoundAlert)Alert("Buy Signal");
}
}//end of for loop
return(rates_total);
}
//+------------------------------------------------------------------+ DislikedHello Cja, Any luck with my request at post #10,241 for indicator that do not attach to the chart at all on MT4 Built 840? Please let me know so, if it is not fixable so I know. Thank you in advance Senan F.Ignored
DislikedHi, I have coded an indi that calls iCustom to draw arrows when certain parameters has been met. When I put the iCustom "TAN" indi being called on the chart it draws and updates perfectly with every new bar, but when I attach the new indi that calls this indi it doesn't update. I've attached the code of the indi that calls this TAN indi. I've had this same problem once some time ago, but for the life of me can't remember the fix. Can anybody please assist. Thanx #property indicator_chart_window #property indicator_buffers 4 #property indicator_color1...Ignored
Disliked{quote} fbrand- Most likely there is a conflict but with out the TAN indi its hard to tell. Best thing to do is attach both indicators so it can be tested.Ignored
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 clrOrange
#property indicator_color2 clrCornflowerBlue
//---- indicator parameters
extern int BandsPeriod=20;
int BandsShift=0;
double BandsDeviations=2.0;
//---- buffers
double MovingBuffer[];
double UpperBuffer[];
double LowerBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
IndicatorBuffers(3);
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,UpperBuffer);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,LowerBuffer);
SetIndexBuffer(2,MovingBuffer);
//----
SetIndexDrawBegin(0,BandsPeriod+BandsShift);
SetIndexDrawBegin(1,BandsPeriod+BandsShift);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Bollinger Bands |
//+------------------------------------------------------------------+
int start()
{
int i,k,counted_bars=0;//IndicatorCounted();
double deviation;
double sum,oldval,newres;
//----
if(Bars<=BandsPeriod) return(0);
//---- initial zero
if(counted_bars<1)
for(i=1;i<=BandsPeriod;i++)
{
MovingBuffer[Bars-i]=EMPTY_VALUE;
UpperBuffer[Bars-i]=EMPTY_VALUE;
LowerBuffer[Bars-i]=EMPTY_VALUE;
}
//----
if(counted_bars>0) counted_bars--;
int limit=Bars-counted_bars;
for(i=0; i<limit; i++)
MovingBuffer[i]=iMA(NULL,0,BandsPeriod,BandsShift,MODE_SMA,PRICE_CLOSE,i);
//----
if(counted_bars>BandsPeriod-1) limit=Bars-counted_bars;
while(limit>=0)
{
bool newBarResultTRUE = _NewBar();
sum=0.0;
k=limit+BandsPeriod-1;
oldval=MovingBuffer[limit];
while(k>=limit)
{
newres=Close[k]-oldval;
sum+=newres*newres;
k--;
}
deviation=BandsDeviations*MathSqrt(sum/BandsPeriod);
UpperBuffer[limit]=oldval+deviation;
LowerBuffer[limit]=oldval-deviation;
limit--;
}//while
//----
return(0);
}
//+------------------------------------------------------------------+
//Check if a new bar has formed. Returns TRUE if it has, else FALSE.
bool _NewBar()
{
static datetime lastbar;
datetime curbar = Time[0];
if(lastbar!=curbar)
{
lastbar=curbar;
return (true);
}
else
{
return(false);
}
} Disliked{quote} ok, I have implemented the EA-stuff from http://www.forexfactory.com/showthre...12#post7394912 into the EA from http://www.forexfactory.com/showthre...12#post7396012 In the backtester it seems to work. pls. notice that I have renamed the EA (mod1) ... {file} {file} {file} {file}Ignored
I'm testing a grid with custom martingale values like:
* Your other script [_Buy_MultipleOrders Script.ex4] works that way. But the EA above have the option to input the personalized Lots sizes, and the script linked only have 1 Lot value.
Thanks in advance
Disliked{quote} Cyber1 Here's the TAN indy. I see this indi has [limit] in the arrays, not sure how this will work, as I've always only used in the arrays, or maybe that's just how BB is calculated. Thanx #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 clrOrange #property indicator_color2 clrCornflowerBlue //---- indicator parameters extern int BandsPeriod=20; int BandsShift=0; double BandsDeviations=2.0; //---- buffers double MovingBuffer[]; double UpperBuffer[]; double LowerBuffer[]; //+------------------------------------------------------------------+...Ignored
Disliked{quote} fbrand- There were several problems. First was a compile error {image} Second the TAN indicator only has 2 buffers that we need 0 and 1 {image} {file}Ignored