Monday, November 25, 2013

Double Doji Amibroker Exploration AFL

What Is a DOJI ?

The doji is a commonly found pattern in a candlestick chart of financially traded assets (stocks, bonds, futures, etc.) in technical analysis. It is characterized by being small in length—meaning a small trading range—with an opening and closing price that are virtually equal.
The doji represents indecision in the market. A doji is not as significant if the market is not clearly trending, as non-trending markets are inherently indicative of indecision. If the doji forms in an uptrend or downtrend, this is normally seen as significant, as it is a signal that the buyers are losing conviction when formed in an uptrend and a signal that sellers are losing conviction if seen in a downtrend.

A doji is a key trend reversal indicator. This is particularly true when there is a high trading volume following an extended move in either direction. When a market has been in an uptrend and trades to a higher high than the previous three trading days, fails to hold that high, and closes in the lower 10% of that day's trading range, there is a high probability of a downtrend in the ensuing days. Likewise, when the market has been in a downtrend and trades to a new low that's lower than the three previous trading days, fails to hold that low, and closes in the upper 10% of that day's trading range, there is a high probability of an uptrend in the ensuing days.

Above Explanation SOURCE : WIKIPEDIA

This is so very clear from the above explanation that DOJI pattern is a very powerful indication for some very important price movement likable to take place soon.

So it will be very helpful to scan the candles which are Dojis. This Amibroker AFL which is posted below will scan for Dojis and Double Dojis.

The AFL will scan for Dojis and will print the Doji on the selected chart also. [Refer Image Below]

Copy The Code :


// double doji exploration 
// By Boufalo Ver. 1.00   
// 
SetChartOptions(0,chartShowArrows|chartShowDates);
Plot( C, "Close", ParamColor("Color", colorBlack ), ParamStyle("Style") | GetPriceStyle() ); 

doji = (O == C);
NearDoji1 = (abs(O-C)<= ((H-L)*0.1));
NearDoji2 =NearDoji1 AND Ref(NearDoji1,-1);
NearDoji3 =NearDoji1 AND Ref(NearDoji1,-1) AND Ref(NearDoji1,-2);

  showDoji = ParamToggle("NearDoji ","SHOW|HIDE",1);
    if( showDoji )
    {
    PlotShapes( shapeDigit0*doji , colorGreen, 0, H, 45 );  
    PlotShapes( shapeDigit1*NearDoji1  , colorBlue, 0, H, 30 );    
    PlotShapes( shapeDigit2*NearDoji2 , colorOrange, 0, H, 30 );    
    PlotShapes( shapeDigit3*NearDoji3, colorBrightGreen, 0, H, 30 );  
    }


Filter = NearDoji2 OR NearDoji3 ;

AddColumn (NearDoji1 ,"1Doji ",1);
AddColumn (NearDoji2 ,"2Doji ",1);
AddColumn (NearDoji3 ,"3Doji ",1);

There is a substantial risk of loss associated with trading in Stock Markets. Losses can and
will occur. No responsibility for loss occurred to any person acting or refraining to act as a result
of using the AFL written by their respective creators and published in this Blog for sharing of knowledge 

can be accepted by the Blog owner.




No comments:

Post a Comment

Required US Government Disclaimer & CTFC Rule 4.41

Futures trading contains substantial risk and is not suitable for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only consider risk capital that should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. CTFC RULE 4.41 – HYPOTHETICAL OR SIMULATED PERFORMANCE RESULTS HAVE CERTAIN LIMITATIONS. UNLIKE AN ACTUAL PERFORMANCE RECORD, SIMULATED RESULTS DO NOT REPRESENT ACTUAL TRADING. ALSO, SINCE THE TRADES HAVE NOT BEEN EXECUTED, THE RESULTS MAY HAVE UNDER-OR-OVER COMPENSATED FOR THE IMPACT, IF ANY, OF CERTAIN MARKET FACTORS SUCH AS LIQUIDITY. SIMULATED TRADING PROGRAMS IN GENERAL ARE ALSO SUBJECT TO THE FACT THAT THEY ARE DESIGNED WITH THE BENEFIT OF HINDSIGHT. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFIT OR LOSSES SIMILAR TO THOSE SHOWN. All trades, patterns, charts, systems, etc., discussed in this website or advertisement are for illustrative purposes only and not construed as specific advisory recommendations. All ideas and materials presented herein are for information and educational purposes only. No system or trading methodology has ever been developed that can guarantee profits or prevent losses. The testimonials and examples used herein are exceptional results which do not apply to average people and are not intended to represent or guarantee that anyone will achieve the same or similar results. Trades placed on the reliance of Trend Methods systems are taken at your own risk for your own account. This is not an offer to buy or sell futures interests.