Simple Coding Help - No Promise.

Code:
Buy = RSI( 15) > 68;
Sell = RSI( 15) <32;
Fiter=Buy OR Sell;

Above code is scanning all stocks which already or ready to cross 68
&
Scanning all stocks which are already below 32 & ready to go below 32 rsi.


My requirement is i need stocks which are around 32 or ready to break 32 or Around 68 or ready to break 68 on upside.

we can do one thing..


i need stocks which are between 64-68 Rsi for longs
i need stocks which are between 36-32 Rsi for shorts.

Thanx you
 

raj_singh

Well-Known Member
I need RSI(8) value in last 3 bar in commentary box and or below OHLC value.

I.E. RSI(8) Last 3rd bar is 44, Second Bar is 40 & Current is 35.

anybody can help?

Thanks
 
I need RSI(8) value in last 3 bar in commentary box and or below OHLC value.

I.E. RSI(8) Last 3rd bar is 44, Second Bar is 40 & Current is 35.

anybody can help?

Thanks
Make sure your Title line has {{VALUES}} embedded somewhere in it

Then simply write following

Plot(Ref(RSI(8), -2), "3rd Last", colorDefault, styleNoDraw);
Plot(Ref(RSI(8), -1), "2nd Last", colorDefault, styleNoDraw);
Plot(RSI(8), "Last", colorDefault, styleNoDraw);
 
PHP:
function HPI( MultFactor, PercentMove )
{
 M = ( H + L ) /2;
 My = Ref( M, -1 );

 I = abs( OpenInt - Ref( OpenInt, -1 ) );
 G = Max( OpenInt, Ref( OpenInt, -1 ) );
 
 K = PercentMove * Volume * ( M - My ) * ( 1  + sign( M - My ) * 2 * I / G );

 //return AMA2( K, MultFactor / 100000, ( 1 - MultFactor ) / 100000 );
 
 return AMA( K, 1/MultFactor )/100000;  	

}
OI = C;
Plot( HPI( 20, 100 ), _DEFAULT_NAME(), ParamColor("Color", ColorCycle ) );

hi


above is herrickpay off index afl for amibroker( the default one )

i reqeust instead of plotting hpi as a line it shud be plotted as histogram .

thanks


regards

sumit
 

amitrandive

Well-Known Member
Above code is scanning all stocks which already or ready to cross 68
&
Scanning all stocks which are already below 32 & ready to go below 32 rsi.


My requirement is i need stocks which are around 32 or ready to break 32 or Around 68 or ready to break 68 on upside.

we can do one thing..


i need stocks which are between 64-68 Rsi for longs
i need stocks which are between 36-32 Rsi for shorts.

Thanx you
Code:
Buy = RSI( 15) > 64 AND RSI( 15) < 68  ;
Sell = RSI( 15) <36 AND RSI( 15) >32;
Fiter=Buy OR Sell;
 

amitrandive

Well-Known Member
PHP:
function HPI( MultFactor, PercentMove )
{
 M = ( H + L ) /2;
 My = Ref( M, -1 );

 I = abs( OpenInt - Ref( OpenInt, -1 ) );
 G = Max( OpenInt, Ref( OpenInt, -1 ) );
 
 K = PercentMove * Volume * ( M - My ) * ( 1  + sign( M - My ) * 2 * I / G );

 //return AMA2( K, MultFactor / 100000, ( 1 - MultFactor ) / 100000 );
 
 return AMA( K, 1/MultFactor )/100000;  	

}
OI = C;
Plot( HPI( 20, 100 ), _DEFAULT_NAME(), ParamColor("Color", ColorCycle ) );

hi


above is herrickpay off index afl for amibroker( the default one )

i reqeust instead of plotting hpi as a line it shud be plotted as histogram .

thanks


regards

sumit
Code:
function HPI( MultFactor, PercentMove )
{
 M = ( H + L ) /2;
 My = Ref( M, -1 );

 I = abs( OpenInt - Ref( OpenInt, -1 ) );
 G = Max( OpenInt, Ref( OpenInt, -1 ) );
 
 K = PercentMove * Volume * ( M - My ) * ( 1  + sign( M - My ) * 2 * I / G );

 //return AMA2( K, MultFactor / 100000, ( 1 - MultFactor ) / 100000 );
 
 return AMA( K, 1/MultFactor )/100000;      

}
OI = C;
Plot( HPI( 20, 100 ), _DEFAULT_NAME(), ParamColor("Color", ColorCycle ), styleHistogram );
 

raj_singh

Well-Known Member
Make sure your Title line has {{VALUES}} embedded somewhere in it

Then simply write following

Plot(Ref(RSI(8), -2), "3rd Last", colorDefault, styleNoDraw);
Plot(Ref(RSI(8), -1), "2nd Last", colorDefault, styleNoDraw);
Plot(RSI(8), "Last", colorDefault, styleNoDraw);
Thanks..:clapping::clapping:
 
Last edited:
Guys.. plz convert this amibroker afl to Metatrader programm..

Plz guys.. its urgent...

thanks in advance.. im not getting any reply's in my thread.. so im coming back to this thread which helped me in past.

_SECTION_BEGIN("SMART TRADING SYSTEM ");
GraphXSpace = 15;
A = DEMA(C,2);
BH = DEMA(a,34)+2*(StDev(a,34));
BL = DEMA(a,34)-2*(StDev(a,34));
BM = (BH+BL)/2;
Highs = TEMA(High, 30);
Lows = TEMA(Low, 30);
A = DEMA(L,2);
BH = DEMA(A,34)+2*(StDev(A,34));
BL = DEMA(A,34)-2*(StDev(A,34));
BM = (BH+BL)/2;
A = DEMA(H,2);
BH = DEMA(A,34)+2*(StDev(A,34));
BL = DEMA(A,34)-2*(StDev(A,34));
UpTrend = C > Highs;
DnTrend = C < Lows ;
BM1 = (BH+BL)/2;
Sell=Cross(BM,C);
Buy=Cross(C,BM1);
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
PlotShapes(IIf(Buy, shapeHollowUpArrow, shapeNone),colorGreen, 0,L, Offset=-15);
PlotShapes(IIf(Sell, shapeHollowDownArrow, shapeNone),colorRed, 0, H, Offset=-15);Colors = IIf(UpTrend, colorGreen, IIf(DnTrend, colorRed, colorLightGrey));
Plot(Close, "Price", Colors, styleCandle | styleThick);
guys plz help.....
converting code from one software to other software take lot of time, you need to take professional help/paid service from professional coder.
Also, if complexity of converting from MT4 to AmiBroker is X, then converting the exact same logic from AmiBroker to MT4 is 5 times X. Innumerable complications exist primarily due to the way in which both of the software handle back-referencing and data arrays.

This thread, as its name clearly reveals, is for "Simple Coding Help ....". Generally such help can be and is provided for free and w/o any return expectation.

My personal rule of thumb is anything that can be solved in less than half-hour and without need of any extensive testing can be included here.

Anyone needing advanced help needs to appreciate and understand that complicated problems cannot be handled in this thread. Also, frequently, we find questions that have already been answered either earlier in this thread or elsewhere in this website. Those seeking solutions need to be willing to look around.

P.S. I hope that Happy Singh agrees with the practical interpretation attempted by me here....
 
Last edited:

Similar threads