Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Behgozin slope finder modified for Amibroker (AFL)
richuw
about 12 years ago
Amibroker (AFL)

Rating:
4 / 5 (Votes 17)
Tags:
trading system, amibroker

This is a modified version of Behogozin slope finder, It adds Buy and Sell signal along with Ribbon information. Buy when it is Green, Sell when it is Red. Pink means you can get out if you wants.

Similar Indicators / Formulas

EMA crossover
Submitted by Ketan-0 almost 14 years ago
Kase Peak Osc. V2 batu
Submitted by batu1453 over 10 years ago
Kase CD V2batu
Submitted by batu1453 over 10 years ago
Ichimoku
Submitted by prashantrdx over 10 years ago
buy and sell two EMAS
Submitted by mundo0007 over 12 years ago
Adaptive Price Zone (APZ)
Submitted by AndrewThomas almost 14 years ago

Indicator / Formula

Copy & Paste Friendly
SetChartBkGradientFill(1,23);
_SECTION_BEGIN("Behgozin Slope Finder");
 
Tr2 = Ref(C,1);
Tr3=Ref(C,7);
Trend2 = MA(Tr2,7);
Trend3=MA(Tr3,7);
Slope1=((Trend3-Trend2)/Trend3)*100;
Plot(Slope1,"Buy When it is Green and Sell when it is Red or Pink",colorGold,styleLine+styleDots|styleThick);


Tr4 = Ref(C,7);
Tr5=Ref(C,15);
Trend3 = MA(Tr4,15);
Trend4=MA(Tr5,15);
Slope2=((Trend4-Trend3)/Trend4)*100;
Plot(Slope2,"",colorGreen,styleLine+styleDots|styleThick);
Plot(0,"",colorWhite,styleLine);
_SECTION_END();SetSortColumns(-2);

//Richu


Buy= nwbull=slope1 > 0 AND slope2 > 0 ; 
Sell=nwbear=slope1 < 0 AND slope2 < 0 ;
Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy );

PlotShapes(IIf(Buy,shapeUpArrow,Null),colorGreen,0,0,-10); 

PlotShapes(IIf(Sell,shapeDownArrow,Null),colorRed,0,0,-10); 

 Plot( 1, /*efines the height of the ribbon in percent of pane width */"ribbon",
 IIf( nwbull, colorLime, IIf( nwbear, colorRed,IIf(Signal()<MACD(), colorPink, colorPink ))), /* choose color */
 styleOwnScale|styleArea|styleNoLabel, -01, 50 );

29 comments

1. anandnst

Good buy/sell signal with scanning(4 Star from me).

2. ramshirsath

be careful arrow changes

3. amon

I warning you, this code uses future prices to adjust the current slope.
Ref(C,7) is the price over the next 7 periods in the future!

4. VIVEK266

repaint buy sell arrows ..

5. gopal

Hi,
Can we use any other method instead of Ref() which refers to future prices ?
Gopi

6. morgen

To GOPAL

1)Block this part of .afl as follow:

//Richu
//Buy= nwbull=slope1 > 0 AND slope2 > 0 AND Haup ; 
//Sell=nwbear=slope1 < 0 AND slope2 < 0 ;
//Buy = ExRem( Buy, Sell );
//Sell = ExRem( Sell, Buy );
//PlotShapes(IIf(Buy,shapeUpTriangle,Null),colorAqua,0,0,-10); 
//PlotShapes(IIf(Sell,shapeDownTriangle,Null),colorOrange,0,0,-10); 

2)Add at the end of .afl as follow:

//FORMULE
stochup= StochK()>StochD() ;
stochup80= StochK()>80 ;
MACDup= MACD()>Signal() ;
MACDnew= (MACD()>Signal() OR MACD()>0 AND CCI()>0) ;
Hist= MACD()-Signal() ;
Histup= Hist>Ref(Hist,-1) ;
MFIupema7= MFI()>EMA(MFI(),7) ;
MFI30= MFI()>30 ;
MFI80= MFI()<80 ;
Cupo= C>O ;
MA10up= MA(C,10)>=Ref(MA(C,10),-1) ;
MA20up= MA(C,20)>=Ref(MA(C,20),-1) ;
EMA50up= EMA(C,50)>=Ref(EMA(C,50),-1) ;
CupEMA50= C>EMA(C,50) ;
Cupma20= C>MA(C,20) ;
PDIupmdi= PDI()>MDI() ;
ADXupmdi= ADX()>MDI() ;
ADX50= ADX()<50 ;
CCIup0= CCI()>0 ;
top2up= BBandTop(C,20,2)>=Ref(BBandTop(C,20,2),-1) ;
top1up= BBandTop(C,20,1)>=Ref(BBandTop(C,20,1),-1) ;
Cuptop1= C>BBandTop(C,20,1) ;
Lim= (ADX()<50 AND MFI()>30) ;
RSIupema7= RSI()>EMA(RSI(),7) ;
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Buy= nwbull=slope1 > 0 AND slope2 > 0 AND macdup AND stochup  AND Cupo AND MFIupema7 ; 
Sell=nwbear=slope1 < 0 AND slope2 < 0 ;

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

PlotShapes(IIf(Buy,shapeUpTriangle,Null),colorBrightGreen,0,0,-10);
PlotShapes(IIf(Sell,shapeDownTriangle,Null),colorOrange,0,0,-10); 
7. anandnst

Lot of errors in HEIKIN-ASHI ORIGINAL Code. Check it

9. isc0rpi0

looking nice will test

10. arian

very nice indicator. thanks

p.s.: any relation with behgozin broker of IR?

11. Ayuraveda

To Correct unstable signal:

// pls. put -1 after C


_SECTION_BEGIN("Behgozin Slope Finder");
 
Tr2 = Ref(C-1,1);
Tr3=Ref(C-1,7);
Trend2 = MA(Tr2,7);
Trend3=MA(Tr3,7);
Slope1=((Trend3-Trend2)/Trend3)*100;

Tr4 = Ref(C-1,7);
Tr5=Ref(C-1,15);
Trend3 = MA(Tr4,15);
Trend4=MA(Tr5,15);
Slope2=((Trend4-Trend3)/Trend4)*100;
12. samapada

Its not working in mine……Showing Blank Chart….Pls Help me… any pulgins I need or wt….. Hope of getting help frm any1

13. hotaro3

Thank you very much all friends, the first, mr Arian I am iranian but not related to behgozin broker. you van find me on facebook as behgozin Ahmad- 2- as I said it was one of my first indicators that has some deficiency that my friends such as Anandnst recognized and mention it in original indicator. thanks for richuw and kv maligi for trying make a better and more effective indicator. I am working on another indicator that is under the test but this indicator can be used very well. please do not consider its variation. If you want decrease the effect of variation change the constant in Trend 2 and 3 to biger one such as 10 and in Trend 4 ad 5 from 15 to 20. It produce more reliable signals but somewhat later. enjoy it and be rich
Behgozin (hotaro)

14. arian

Dear Hotaro,

congratulations on your very nice work!

q: i have noticed that in many shares, the trend is strongly upward but in your AFL, the slope is down warding. how it could be explained?

thnx and rgrds!
Arian

15. hotaro3

Mr Arian- I think the difference is inside the method of calculation for future prices by Amibroker. otherwise there is not any unususl lines in my program with respect to others

16. Kabir

Thanks Morgan……For ur correct afl

17. Kabir

It would be more helpful is u can plot the parameter of Day range…….

18. Kabir

The arrow is still changing……

19. mbzd

it looks to future data. it is useless.

20. kananwisha

yes, that’s right!
“The arrow is still changing” because of it using future values. If you do a back testing, this system give a fantastic result.

But take care to use this in a live market If you don’t want to broke

21. merykhi

GOOD ONE SIR AND THANKS FOR SHARING
PRASAD

22. ibrahimatm

This afl gives signal when crosses zero line. Can any expert help me to make it gives buy signal when both lines are minimum 4 points above zero ( it may be 5, 6, 7, or 8 or above and each line may have different values as well). I want to use it for exploration or scanner.
Regards

23. ssdas0172

mr. Morgen
1st of all thanks. bt still it changes buy sell signal.

24. ssdas0172

need sell signal

25. gholamreza

good.good*1000

26. mrdzenli

ну да, на истории работает (идиоты)

27. davidalan

line161 “q” should be “p”
line 162 “p” should be “q” gets triagles pointing in the right direction

28. mnasiru

Thanks for sharing.

29. thanh_bkhn1984

How to arrows unchanged(non-repaint)?

30. vkb29

any one correct and then full code of this afl paste plzzzzzz

Leave Comment

Please login here to leave a comment.

Back