Jump to content

need help writing analysis efl for amibroker


Recommended Posts

Well, I did not expect my first post to be criticized

– yes, seven years ago I registered and then after a bit I went away, personal stuff.

– I believe that thanking everybody for writing something useful would only clutter the site. That doesn't mean that I am not thankful for all the people that contribute.

– Your comment I find rude and un-necessary, that is not how people should be helped, it would only drive them away.

Link to comment
Share on other sites

Well, I did not expect my first post to be criticized

– yes, seven years ago I registered and then after a bit I went away, personal stuff.

– I believe that thanking everybody for writing something useful would only clutter the site. That doesn't mean that I am not thankful for all the people that contribute.

– Your comment I find rude and un-necessary, that is not how people should be helped, it would only drive them away.

 

Well, people expect the moon but the reality is something different. Step out of your dream world and welcome to real world. There is something called as gratitude and it never harms or so to say never clutters the website. It would have been nice if you could have accepted the fact with grace instead of flagging it as rude and unnecessary. A simple response that you will try to be more active going forward would have encouraged people to help you.

 

Enough said here is what you were looking for.

 

_section_begin("strategy_001");

 

v_ma_p = param("Volume MA Period", 90, 2, 200, 1);

v_ma_f = param("Volume MA Factor", 1, 1, 20, 1);

v_limit = param("Volume limit", 200000, 0, 1000000, 1);

 

slow_stoch_k_p = param("Slow Stochastic %K - I period", 14, 2, 300, 1);

slow_stoch_k_smooth_p = param("Slow Stochastic %K - I smooth period", 3, 2, 200, 1);

 

min_c = param("Show stocks close above", 5, 1, 100000, 1);

 

v_ma_a = ma(v, v_ma_p);

slow_stoch_k_a = stochk(slow_stoch_k_p, slow_stoch_k_smooth_p);

bullish_engulfing_a = cdbullishengulfing(bodyfactor = 0.4, rangefactor = 0.5);

 

buy_v_ma = (v_ma_a > v_limit);

buy_slow_stoch_k = (slow_stoch_k_a <= 20);

buy_bullish_engulfing = bullish_engulfing_a;

buy_c = (c > min_c);

 

buy = buy_v_ma and buy_slow_stoch_k and buy_bullish_engulfing and buy_c;

 

filter = buy;

 

_section_end();

Link to comment
Share on other sites

Guest anuraghsr

its same as u make for bullish just reverse it for short

 

 

-find stocks that trade above $5.00

-find stocks that have average volume of 200000 shares in last 90 days

-stochastic in overbought - above 80

-bearish engulfing signal

 

thank you very much

Link to comment
Share on other sites

thank you very much insaneikea

In the analysis window if I enter "1 recent bar(s)" with this formula I do not get any hits, that is on the Canadian market, possible, But- hmmmmm!

This might sound ****** but looking at some of the candlestick formulas, question would be where would this fit (from Stephen Bigelow site)

(01>C1)AND(C>0)AND(C>=01)AND(C1>=0)AND((C-0)>(01-C1))

is this now replaced by "cdbullishengulfing"?

 

bearish engulfing is quite understandable. What would be your sell criteria for stochastics ?

stochastics for the sell signal would be about 80 (overbought)

Link to comment
Share on other sites

More info here https://www.tradingwithrayner.com/stochastic-indicator/

 

_section_begin("strategy_001");

 

v_ma_p = param("Volume MA Period", 90, 2, 200, 1);

v_ma_f = param("Volume MA Factor", 1, 1, 20, 1);

v_limit = param("Volume limit", 200000, 0, 1000000, 1);

 

slow_stoch_k_p = param("Slow Stochastic %K - I period", 14, 2, 300, 1);

slow_stoch_k_smooth_p = param("Slow Stochastic %K - I smooth period", 3, 2, 200, 1);

slow_stock_buy_level = param("Slow Stochastic Buy Level", 20, 0, 100, 1);

slow_stock_sell_level = param("Slow Stochastic Sell Level", 80, 0, 100, 1);

 

min_c = param("Show stocks close above", 5, 1, 100000, 1);

 

v_ma_a = ma(v, v_ma_p);

slow_stoch_k_a = stochk(slow_stoch_k_p, slow_stoch_k_smooth_p);

bullish_engulfing_a = cdbullishengulfing(bodyfactor = 0.4, rangefactor = 0.5);

bearish_engulfing_a = cdbearishengulfing(bodyfactor = 0.4, rangefactor = 0.5);

 

v_ma_cond = (v_ma_a > v_limit);

c_cond = (c > min_c);

 

buy_slow_stoch_k = (slow_stoch_k_a <= slow_stock_buy_level);

buy_bullish_engulfing = bullish_engulfing_a;

 

sell_slow_stoch_k = (slow_stoch_k_a >= slow_stock_sell_level);

sell_bearish_engulfing = bearish_engulfing_a;

 

buy = v_ma_cond and c_cond and buy_slow_stoch_k and buy_bullish_engulfing;

sell = v_ma_cond and c_cond and sell_slow_stoch_k and sell_bearish_engulfing;

 

filter = buy or sell;

 

action_txt = "na";

if (lastvalue(buy)) {

action_txt = "buy";

} else if (lastvalue(sell)) {

action_txt = "sell";

}

 

addtextcolumn(action_txt, "Action");

setsortcolumns(3);

 

_section_end();

Link to comment
Share on other sites

this is great, thanks

 

Yes, tradingwithrayner looks very interesting

 

what would you change to give you only results from the last candlestick rather then what happened 2 months ago or week ago?

using amibroker

 

In the analysis window just select one recent bar before running the exploration.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...