What is your best technical indicator? Open Poll :)

Post Reply
User avatar
bourgenot
Trader
Posts: 159
Joined: Mon Aug 27, 2012 4:37 pm

Re: What is your best technical indicator? Open Poll :)

Post by bourgenot »

For my, laguerre is better than RSI/STO, ( i work in 15 tf), try and compare :
//+------------------------------------------------------------------+
//| LaGuerre RSI v1.00.mq4 |
//| mladen |
//+------------------------------------------------------------------+
#property copyright "mladen modified by TIMEX"
#property link ""

#property indicator_separate_window
#property indicator_minimum 0
#property indicator_maximum 1
#property indicator_buffers 3
#property indicator_color1 Red
#property indicator_color2 Lime
#property indicator_color3 OrangeRed

//
//
// Alternative: Gama = 0.55,levels 0.75,0.45,0.15
//
//

extern double Gama = 0.5; //ootb was 0.77
extern int PriceType = 0;
extern double Level1 = 0.80;
extern double Level2 = 0.50;
extern double Level3 = 0.20;
extern bool ShowLevels = true;
extern bool ShowCrossings = true;
extern bool alertsOn = true;
extern bool alertsMessage = true;
extern bool alertsSound = false;
extern bool alertsEmail = false;
extern color LevelsColor = C'30,33,36';

//
//
//
//
//

double MainBuffer[];
double CUpBuffer[];
double CDnBuffer[];
double L0[];
double L1[];
double L2[];
double L3[];
string ShortName;


//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+

int init()
{
IndicatorBuffers(7);
SetIndexBuffer(0, MainBuffer);
SetIndexBuffer(1, CUpBuffer);
SetIndexBuffer(2, CDnBuffer);
SetIndexBuffer(3, L0);
SetIndexBuffer(4, L1);
SetIndexBuffer(5, L2);
SetIndexBuffer(6, L3);

//
//
//
//
//

if (ShowCrossings)
{
SetIndexStyle(1,DRAW_ARROW);
SetIndexStyle(2,DRAW_ARROW);
SetIndexArrow(1,159);
SetIndexArrow(2,159);
}
else
{
SetIndexStyle(1,DRAW_NONE);
SetIndexStyle(2,DRAW_NONE);
}

//
//
//
//
//

ShortName=MakeUniqueName("Laguerre Alert "," ("+DoubleToStr(Gama,2)+")");
IndicatorShortName(ShortName);
SetIndexLabel(0,"Laguerre RSI");
return(0);
}
int deinit()
{
DeleteBounds();
return(0);
}

//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+

int start()
{
int counted_bars=IndicatorCounted();
int i,limit;

if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
limit = Bars - counted_bars;

//
//
//
//
//

for(i = limit; i >= 0 ; i--)
{
MainBuffer = LaGuerre(Gama,i,PriceType);
CUpBuffer = EMPTY_VALUE;
CDnBuffer = EMPTY_VALUE;
if (MainBuffer > Level1 && MainBuffer[i+1] < Level1) CUpBuffer = Level1;
if (MainBuffer < Level1 && MainBuffer[i+1] > Level1) CDnBuffer = Level1;
if (MainBuffer > Level3 && MainBuffer[i+1] < Level3) CUpBuffer = Level3;
if (MainBuffer < Level3 && MainBuffer[i+1] > Level3) CDnBuffer[i] = Level3;
}

//
//
//
//
//

if (ShowLevels) UpdateBounds();
if (alertsOn) CheckCrossings();
return(0);
}


//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
//
//
//
//
//

double LaGuerre(double gamma, int i, int priceType)
{
double Price = iMA(NULL,0,1,0,MODE_SMA,priceType,i);
double RSI = 0.00;
double CU = 0.00;
double CD = 0.00;


L0[i] = (1.0 - gamma)*Price + gamma*L0[i+1];
L1[i] = -gamma*L0[i] + L0[i+1] + gamma*L1[i+1];
L2[i] = -gamma*L1[i] + L1[i+1] + gamma*L2[i+1];
L3[i] = -gamma*L2[i] + L2[i+1] + gamma*L3[i+1];

if (L0[i] >= L1[i])
CU = L0[i] - L1[i];
else CD = L1[i] - L0[i];
if (L1[i] >= L2[i])
CU = CU + L1[i] - L2[i];
else CD = CD + L2[i] - L1[i];
if (L2[i] >= L3[i])
CU = CU + L2[i] - L3[i];
else CD = CD + L3[i] - L2[i];

//
//
//
//
//

if (CU + CD != 0) RSI = CU / (CU + CD);
return(RSI);
}


//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
//
//
//
//
//

void CheckCrossings()
{

if (CDnBuffer[0] == Level1) doAlert("level "+DoubleToStr(Level1,2)+" crossed down");
if (CUpBuffer[0] == Level3) doAlert("level "+DoubleToStr(Level3,2)+" crossed up");

}

//
//
//
//
//

void doAlert(string doWhat)
{
static string previousAlert="nothing";
static datetime previousTime;
string message;

if (previousAlert != doWhat || previousTime != Time[0]) {
previousAlert = doWhat;
previousTime = Time[0];

//
//
//
//
//

message = StringConcatenate(Symbol()," at ",TimeToStr(TimeLocal(),TIME_SECONDS)," Laguerre ",doWhat);
if (alertsMessage) Alert(message);
if (alertsEmail) SendMail(StringConcatenate(Symbol()," Laguerre line crossing"),message);
if (alertsSound) PlaySound("alert2.wav");
}
}


//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
//
//
//
//
//

string MakeUniqueName(string first, string rest)
{
string result = first+(MathRand()%1001)+rest;

while (WindowFind(result)> 0)
result = first+(MathRand()%1001)+rest;
return(result);
}

//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
//
//
//
//
//

void DeleteBounds()
{
ObjectDelete(ShortName+"-1");
ObjectDelete(ShortName+"-2");
ObjectDelete(ShortName+"-3");
}
void UpdateBounds()
{
if (Level1 > 0) SetUpBound(ShortName+"-1",1.0000 ,Level1);
if (Level2 > 0) SetUpBound(ShortName+"-2",Level2*1.01,Level2*0.99);
if (Level3 > 0) SetUpBound(ShortName+"-3",Level3 , 0.0000);
}
void SetUpBound(string name, double up, double down,int objType=OBJ_RECTANGLE)
{
if (ObjectFind(name) == -1)
{
ObjectCreate(name,objType,WindowFind(ShortName),0,0);
ObjectSet(name,OBJPROP_PRICE1,up);
ObjectSet(name,OBJPROP_PRICE2,down);
ObjectSet(name,OBJPROP_COLOR,LevelsColor);
ObjectSet(name,OBJPROP_BACK,true);
ObjectSet(name,OBJPROP_TIME1,iTime(NULL,0,Bars-1));
}
if (ObjectGet(name,OBJPROP_TIME2) != iTime(NULL,0,0))
ObjectSet(name,OBJPROP_TIME2, iTime(NULL,0,0));
}
Radar
Trader
Posts: 437
Joined: Fri Mar 23, 2012 5:39 pm
Location: Round the bend ;)

Re: What is your best technical indicator? Open Poll :)

Post by Radar »

Hey Taipan,
taipan wrote:
bourgenot wrote:GOOD trend indy, my favorite

How does this work? Is it based on pips up/down velocity of 10 pips?

Right now the alert is there but don't know which currency pair is giving alert if you attach it to many charts. So please modify it to show which currency pair is giving alert on the message.

Went one better, and added timeframe as well :)

Have a look inside the original, and the edited one... Bugger all difference, really, but you'll know what to look for next time ;)

Have fun!

Radar =8^)
You do not have the required permissions to view the files attached to this post.
Check out my new, (well, old now), manual trade & automatic scale-in manager,
StackManV2
User avatar
jako
Trader
Posts: 105
Joined: Wed Jun 20, 2012 6:07 pm
Location: Slovensko

Re: What is your best technical indicator? Open Poll :)

Post by jako »

User avatar
bourgenot
Trader
Posts: 159
Joined: Mon Aug 27, 2012 4:37 pm

Re: What is your best technical indicator? Open Poll :)

Post by bourgenot »

Jako, i like simple indicator ! sorry
Radar
Trader
Posts: 437
Joined: Fri Mar 23, 2012 5:39 pm
Location: Round the bend ;)

Re: What is your best technical indicator? Open Poll :)

Post by Radar »

Hey Bourgenot,
bourgenot wrote:GOOD trend indy, my favorite

Where did you get that mini-chart indicator on the right of your screenshot? That's a nice, quick way of getting a top-down view of what a pair is doing, and where it my be headed :)

Thanks,

Radar =8^)
Check out my new, (well, old now), manual trade & automatic scale-in manager,
StackManV2
Radar
Trader
Posts: 437
Joined: Fri Mar 23, 2012 5:39 pm
Location: Round the bend ;)

Re: What is your best technical indicator? Open Poll :)

Post by Radar »

bourgenot wrote:Jako, i like simple indicator ! sorry
There's a much later version of that indicator, and it's very, very good :)

It was designed for ForexHard's StairStepBreakOut strategy, here... http://www.forexfactory.com/showthread.php?t=302007

So many people tried to backtest the strategy and indicator, but what they didn't realize was that the indicator is the backtester... You configure the pip-range, number of bars, etc, and the indicator would look back 100 days on an M15 chart, and it would tell you how many trades would have been made, the percentages of winners and losers, and total pips earned. It really is a beautiful piece of work! :)

Now, if I could understand the code in that, I would call myself a coder :lol:

Have fun!

Radar =8^)
Check out my new, (well, old now), manual trade & automatic scale-in manager,
StackManV2
User avatar
jako
Trader
Posts: 105
Joined: Wed Jun 20, 2012 6:07 pm
Location: Slovensko

Re: What is your best technical indicator? Open Poll :)

Post by jako »

Radar wrote:
bourgenot wrote:Jako, i like simple indicator ! sorry
There's a much later version of that indicator, and it's very, very good :)

It was designed for ForexHard's StairStepBreakOut strategy, here... http://www.forexfactory.com/showthread.php?t=302007

So many people tried to backtest the strategy and indicator, but what they didn't realize was that the indicator is the backtester... You configure the pip-range, number of bars, etc, and the indicator would look back 100 days on an M15 chart, and it would tell you how many trades would have been made, the percentages of winners and losers, and total pips earned. It really is a beautiful piece of work! :)

Now, if I could understand the code in that, I would call myself a coder :lol:

Have fun!

Radar =8^)
The original indicator is much better. Only it lacks alert after the new box.
User avatar
jako
Trader
Posts: 105
Joined: Wed Jun 20, 2012 6:07 pm
Location: Slovensko

Re: What is your best technical indicator? Open Poll :)

Post by jako »

Searches silence before the storm.
User avatar
jako
Trader
Posts: 105
Joined: Wed Jun 20, 2012 6:07 pm
Location: Slovensko

Re: What is your best technical indicator? Open Poll :)

Post by jako »

bourgenot wrote:Jako, i like simple indicator ! sorry
Beauty is irrelevant.
User avatar
fxdaytrader
Trader
Posts: 190
Joined: Sun Jun 10, 2012 7:03 am
Location: Poon-Town (germany, se-asia, se-europe) ...

Re: What is your best technical indicator? Open Poll :)

Post by fxdaytrader »

Radar wrote: Where did you get that mini-chart indicator on the right of your screenshot? That's a nice, quick way of getting a top-down view of what a pair is doing, and where it my be headed :)
It is the 'Stratman Minichart indicator', find the newest version here (its free):
http://www.pipware.com/software/mini-charts.html

use google or forum searches for older versions, you may find e.g.
http://www.forexfactory.com/showthread.php?t=198729
:idea:
Post Reply

Return to “Manual trading systems”