How to generate ea

dear zerodha

i have my own strategies . how shall i enter strategies on coding  ?

my strategies are as follows

TECHNICAL INDICATORS

  1. TREND MOVING AVERAGES

EMA 5- WHITE

EMA 15 – RED

EMA 30 – BLUE

EMA 60 - GREEN

  1. DONCHAIN CHANNELE – 20 INTEVAL – WHITE
  2. PSAR – PINK
  3. CCI – BLACK

SHORT TRADE

ENTRY

  1. IDENTIFY TREND-DOWNTREND
  1. EMA 5 IS BELOW EMA 15 AND POINTING DOWN
  2. EMA 15 IS BELOW  EMA 30 AND POINTING DOWN
  1. DONCHAIN OVER BOUGHT SIGNAL
  2.   
  1. LOOK FOR RETRACEMENT OF BUY CANDLE(GREEN CANDLE) OCURES TO EMA 60
  2. ANY PRICE CANDLE CLOSE BELOW EMA 60
  1. CCI IS LOWER THAN – 100
  2. PSAR DOT APPERAS ABOVE CANDLESTICK

PROFIT BOOKING

  1. PSAR BELOW CANDLE STICK
  2. EMA 5 CLOSE ABOVE EMA 15 (CHANGE OF TREND)
  3. DONCHAIN OVER SOLD SIGNAL

STOP LOSS

  1. ABOVE EMA 60
  2. ABOVE PSAR OR PSAR POINT

TWO TO THREE THOUSAND

  1.  

ENTRY

  1. IDENTIFY TREND-UPTREND
  1. EMA 5 IS ABOVE EMA 15 AND POINTING UP
  2. EMA 15 IS ABOVE  EMA 30 AND POINTING UP
  1. DONCHAIN OVER SOLD SIGNAL
  2.   
  1. LOOK FOR RETRACEMENT OF SELL CANDLE(RED CANDLE) OCURES TO EMA 60
  2. ANY PRICE CANDLE OPENS ABOVE EMA 60
  1. CCI IS HIGHER THAN + 100
  2. PSAR DOT APPERAS BELOW CANDLESTICK

PROFIT BOOKING

  1. PSAR ABOVE CANDLE STICK
  2. EMA 5 CLOSE BELOW EMA 15 (CHANGE OF TREND)
  3. DONCHAIN OVER SOLD SIGNAL

STOP LOSS

  1. BELOW EMA 60
  2. BELOW PSAR OR PSAR POINT

TWO TO THREE THOUSAND

please contact

[email protected]

8180033988

_SECTION_BEGIN("Trend_trading");

//Donchian channel
pds=20;
DonchianUpper =HHV(Ref(H,-1),pds);
DonchianLower = LLV(Ref(L,-1),pds);
DonchianMiddle = (DonchianUpper+DonchianLower)/2;
 
last = GetRTData("Last");
 
//EMA
x = EMA(Close,3);
y = EMA(Close,15);
z = EMA(Close,30);

//PSAR
acc = Param("Acceleration", 0.02, 0, 1, 0.001 );
accm = Param("Max. acceleration", 0.2, 0, 1, 0.001 );

Plot(EMA(Close,3),"",colorBrightGreen, styleLine, styleThick);
Plot(EMA(Close,15),"",colorRed, styleLine, styleThick);
Plot(EMA(Close,30),"",colorblue, styleLine, styleThick);
GraphXSpace=0.5;
Plot(C,"",colorBlue,styleCandle);

//Cross over of EMA's
//breakout once candle close above donchain upper channel and ema (5 > 15 > 30)
Buy = Close > EMA( Close , 15 ) AND (x>y) AND (y>z) AND (Close > DonchianUpper);

Sell = (Close < SAR(acc,accm)) AND (x<y) AND (Close < DonchianLower);

//Breakdown once candle closes below Donchian lower channel and Ema( 5 < 15 < 30)
Short = Close < EMA( Close , 15 ) and (y<z) AND (x < y) AND (Close < DonchianLower);

Cover = (Close > SAR(acc,accm)) AND (x>y) AND (Close > DonchianUpper);

Plot(DonchianUpper,"DU",colorBlue,styleLine);
Plot(DonchianMiddle,"DM",colorGreen,styleLine);
Plot(DonchianLower,"DL",colorRed,styleLine);

Buy = ExRem(Buy,Short);
Short = ExRem(Short,Buy);
Cover = ExRem(Cover,Sell);
Sell = ExRem(Sell,Cover);

PlotShapes(shapeUpArrow*Buy,colorGreen, 0, L, Offset=-45);
PlotShapes(shapeSmallDownTriangle*Sell,colorblue, 0, L, Offset=-45);
PlotShapes(shapeSmallUpTriangle*Cover,colorred, 0, L, Offset=-45);
PlotShapes(shapeDownArrow*Short,colorOrange, 0, H, Offset=-45);

Plot( SAR( acc, accm ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style", styleDots | styleNoLine, maskDefault | styleDots | styleNoLine ) );

_SECTION_END();

Please find the amibroker afl as per the requirement, let me know if you need any further assistance.

Regards

Vivith

www.neotradeanalytics.com

(Authorized realtime data vendor of NSE supporting realtime data to Amibroker, Metastock and Ninjatrader)

2 Likes

please tell me how to put these value in create EA

sorry but its not helpful i am unable to put in ea please help

Sorry Shriyash, this is afl code for amibroker, zerodha folks could help to put in ea.
Regards
Vivith
www.neotradeanalytics.com
(authorized vendor of NSE supporting realtime data feeds to Amibroker , Metastock and NInjatrader)