Quadra Trading System
Quadra Trading System
Quadra Trading System
/* */
/* Quadra Trading System */
/* Version 1.30 */
/* (11 August 2012) */
/* */
/****************************/
/**********************/
/* */
/* Define Wilder's MA */
/* */
/**********************/
/**********************/
/* */
/* Define EMA */
/* */
/**********************/
/********************/
/* */
/* Wilder's MAs */
/* */
/********************/
A1 = WilderMA(C, 5);
A2 = WilderMA(C, 8);
A3 = WilderMA(C, 13);
A4 = MyEMA(C, 50);
/********************/
/* */
/* Candle Color */
/* */
/********************/
Green = C > O;
Red = C < O;
/********************/
/* */
/* COMPUTE SL */
/* */
/********************/
PrevHi = H;
PrevLo = L;
SLBuy = Null;
SLShort = Null;
GUp = GapUp();
GDn = GapDown();
/********************/
/* */
/* BUY/SELL */
/* */
/********************/
/***********************/
/* */
/* SHOW/HIDE Option */
/* */
/***********************/
if(ShowTSL)
{
Plot(SLBuy, "SL for Buy", colorLightBlue, styleDots);
Plot(SLShort, "SL for Short", colorGold, styleDots);
}
if(Arrows)
{
PlotShapes(Marker1, MarkerColor, 0, MArker1Dist);
}
}
if(Status("action") == actionExplore)
{
Filter = Buy | Sell;
SetOption("NoDefaultColumns", True);
AddTextColumn(Name(), "SYMBOL");
AddColumn(DateTime(), "DATE", formatDateTime);
AddColumn(IIf(Buy, 66, 83), "TRIGGER", formatChar, colorWhite, IIf(Buy,
colorGreen, colorRed));
AddColumn(EMA_Position, "EMA Position",1.0);
AddColumn(IIf(Buy, H + 0.1, L - 0.1), "TRIG PRICE", 1.2);
AddColumn(IIf(Buy, SLBuy, SLShort), "Stop Loss", 1.2);
AddColumn(C, "Last Close", 1.2);
}