إضافة رد
قديم 27-03-2016, 04:36 PM
  المشاركه #31

عضو هوامير المميز

تاريخ التسجيل: Aug 2005
المشاركات: 1,777
غنيمة غير متواجد حالياً  

رد: معادلات للمضارب اللحظي على الايمى بروكر


يعطيك الف عافيه مجهوود تشكر عليه


رد مع اقتباس
 
 

قديم 27-03-2016, 11:03 PM
  المشاركه #32

عضو هوامير المميز

تاريخ التسجيل: Apr 2012
المشاركات: 194
amm1430 غير متواجد حالياً  

رد: معادلات للمضارب اللحظي على الايمى بروكر


اقتباس:
المشاركة الأصلية كتبت بواسطة غنيمة مشاهدة المشاركة
يعطيك الف عافيه مجهوود تشكر عليه
الله يعافيك ويجزاك كل خير



رد مع اقتباس
قديم 17-06-2016, 10:55 AM
  المشاركه #33

عضو هوامير المميز

تاريخ التسجيل: Dec 2014
المشاركات: 814
الكاد غير متواجد حالياً  

رد: معادلات للمضارب اللحظي على الايمى بروكر


بارك الله فيك


رد مع اقتباس
قديم 19-06-2016, 04:58 AM
  المشاركه #34

عضو هوامير المميز

تاريخ التسجيل: Apr 2012
المشاركات: 194
amm1430 غير متواجد حالياً  

رد: معادلات للمضارب اللحظي على الايمى بروكر


الانفجار السعري يتم تعديل البلونجر السفلى الى 10و2.50 وتختار اللون المفضلرد: معادلات للمضارب اللحظي على الايمى بروكر
















AddTextColumn( FullName(), "full____________ name", 77 , colorDefault );


_SECTION_BEGIN("Natraj EOD Tech Chart");
GraphXSpace = 15;_SECTION_BEGIN("???? ?????");
r1 = Param( "Fast avg", 11, 3, 20, 1 );
r2 = Param( "Slow avg", 35, 10, 35, 1 );
r3 = Param( "Signal avg", 6, 3, 20, 1 );
ml = MACD(r1, r2);
sl = Signal(r1,r2,r3);
Hst = ml-sl;
A1=EMA(C,4)-EMA(C,34);
BBtops=BBandTop(A1,10,1);
BBbots=BBandBot(A1,10,1);

Color_bar=IIf(a1>BBtops, colorBlue,IIf(a1<BBbots,colorRed,colorYellow));

bbtop = BBandTop( Hst, 10, 1 );
bbbot = BBandBot( Hst, 10,1 );

Color = IIf (Hst > BBtop,colorBlue,IIf(hst < bbbot,colorRed, IIf (Hst > 0,colorBlue,colorRed)));Buy = Cross (Hst,bbtop);Sell = Cross (bbtop,Hst);Short = Cross (bbbot,Hst);Cover = Cross (Hst,bbbot);
Plot (Close,"close",Color_bar,styleCandle);

_SECTION_BEGIN("SAR");
acc = Param("Acceleration", 0.02, 0, 1, 0.001 );
accm = Param("Max. acceleration", 0.2, 0, 1, 0.001 );
Plot( SAR( acc, accm ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style", styleDots | styleNoLine, maskDefault | styleDots | styleNoLine ) );
_SECTION_END();
_SECTION_BEGIN("EMA CROSSOVER CHART");
LongPer = Param("Long Period", 25, 30, 100, 5);
ShortPer = Param("Short Period", 50, 30, 100, 5);
LongMA = EMA(C, LongPer);
ShortMA = EMA(C, ShortPer);
LastHigh = HHV(H, LongPer);
GraphXSpace = 10;
Buy = Cross(LongMA, ShortMA);
Short=SAR( acc, accm )>C;
Sell = Cross(ShortMA, LongMA);
Cover=SAR( acc, accm )<C;

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

PlotShapes(Buy*shapeSmallUpTriangle,colorBlue ,0,L,-51);
PlotShapes(Short*shapeHollowDownTriangle,colorPink , 0,L,-45);
PlotShapes(Sell*shapeSmallDownTriangle,colorRed,0, H,-51);
PlotShapes(Cover*shapeHollowUpTriangle,colorSkyblue,0,H,-45);




per=Param("ZigZag change amount", 1, 0.1,100,0.1);
cbar = Param("cbar",4,2,50,1);
pk=PeakBars(H,per)==0;
tr=TroughBars(L,per)==0;
zzHi=Zig(H,per);
zzLo=Zig(L,per);
Avg=(zzHi+zzLo)/2;
x=IIf(pk,zzHi,IIf(tr,zzLo,IIf(Avg>Ref(Avg,-1),H,L)));
zzHiLo=Zig(x,per);
Plot( zzHiLo, "", ParamColor("Color",colorRed), ParamStyle("Style"));

pR=PeakBars(H,per)==0;
pS =TroughBars(L,per)==0;
RF=ValueWhen(pR,H);
SF=ValueWhen(pS,L);
RF1 = IIf(RF AND BarsSince(pR) <=cbar,RF,Null);
SF1 = IIf(SF AND BarsSince(pS ) <=cbar,SF,Null);
Plot(RF1,"",colorWhite,styleDots | styleNoLine);
Plot(SF1,"",colorWhite,styleDots | styleNoLine);
Plot(RF,"",colorBlack,40+16);
Plot(SF,"",colorBlack,40+16);

Buy=Cross(C,RF1);
Sell=Cross(SF1,C);
PlotShapes(IIf(Buy,shapeSmallUpTriangle,shapeNone),colorWhite,0,L,-12);
PlotShapes(IIf(Sell,shapeSmallDownTriangle, shapeNone),colorWhite,0,H,-12);
_SECTION_BEGIN("Exploration");
Filter=Close;
Var = WriteIf(Buy,"BUY",WriteIf(Sell,"SELL",""));
AddTextColumn(Var , "Buy/Sell", 1.2 , colorWhite, IIf( Buy, colorBlue,IIf(Sell,colorRed,colorWhite) ));
//==============================
psh= ParamToggle("Pivot Shapes","Off|On",1);
plb= ParamToggle("Pivot Labels","Off|On",1);
snd= ParamToggle("Sound Alerts","Off|On",1);
lbk= Param("Hi Lo Lookback",350,50,5000,10);
nbz= Param("Swing Bars",5,5,150,1);
tht= Param("Hi Label Adjust",0.65,0.10,5,0.05)*ATR(5);
lbk= Min(BarCount-1,Lbk);
bc=BarCount-1;
//================
xH=H-H; xL=L-L; yH=H-H; yL=L-L; xR=H-H; xS=L-L;
xrb=0; xSb=0; yR0=0; yS0=0; xR0=0; xS0=0; xx=0;
xHH= HHVBars(H,nbz); xLL= LLVBars(L,nbz);
yHH= HHV(H,nbz); yLL= LLV(L,nbz);
viz= Status("BarVisible");
vbz= LastValue(Highest(IIf(viz,BarIndex(),0)));
_TRACE("Last visible bar: "+ vbz);
bct= (BarCount-1); = "";
if(xLL[bc]<xHH[bc]) { ="D"; } else { ="U"; }
for(i=0; i<lbk; i++) { bc=bct-i;
if(xLL[bc]<xHH[bc]) { if(=="U"){="D";
xx=bc-xLL[bc]; xL[xx]=1;
yL[xSb]=L[xx]; xS[xSb]=xx; xSb++; }
} else { if(=="D") { = "U";
xx=bc-xHH[bc]; xH[xx]=1; yH[xrb]=H[xx]; xR[xrb]=xx;xrb++; }}}
xP= 0; yP= 0; xS0= xS[0]; yS0=yL[0]; xR0= xR[0]; yR0= yH[0];
if(xS0>xR0) { xP=bc-xHH[bc]; yP= yHH[bc];
if(yR0<yP AND xP>xS0 AND xP<bc) { xH[xP]=1;
for(j=0; j<xrb; j++) { yH[xrb-j]= yH[xrb-(j+1)];
xR[xrb-j]= xR[xrb-(j+1)]; }
yH[0]= yP; xR[0]= xP; xrb++; }
} else { xP= bc-xLL[bc]; yP= yLL[bc];
if(yS0>yP AND xP>xR0 AND xP<bc) { xL[xP]=1;
for(j=0; j<xSb; j++) { yL[xSb-j]= yL[xSb-(j+1)]; xS[xSb-j]= xS[xSb-(j+1)]; }
yL[0]=yP; xS[0]=xP; xSb++; }}
ushp=shapeHollowUpArrow; dshp=shapeHollowDownArrow;
if(psh)
if(snd) {
AlertIf(xL==1,"SOUND C:\\Windows\\Media\\Windows XP Startup.wav","Audio alert",2);
AlertIf(xH==1,"SOUND C:\\Windows\\Media\\Ringin.wav","Audio alert",2); }
Buy=(xL); Sell=(xH); Cover=(xL); Short=(xH); Long=Flip(Buy,Sell); Shrt=Flip(Sell,Buy);
SellPrice=ValueWhen(Sell,H,1); BuyPrice= ValueWhen(Buy,L,1);
if(plb) {
for(i=0; i<BarCount; i++) {
if(Buy[i] )PlotText("\n\n"+ StrRight(NumToStr(L[i],6.2),10),i-1,L[i],colorWhite);
if(Sell[i])PlotText(StrRight(NumToStr(H[i],6.2),10),i-1,H[i]+tht[i],colorWhite); }
}






_SECTION_BEGIN("EMA1");
P = ParamField("Price field",-1);
_SECTION_END();

PI = atan(1.00) * 4;
periods = 30;
HighHigh = HHV(H, periods);
LowLow = LLV(L, periods);
range = 25 / (HighHigh - LowLow) * LowLow;
MA1= EMA(C,200);
x1_MA = 0;
x2_MA= 1;
y1_MA= 0;
y2_MA= (Ref(MA1, -1) - MA1) / Avg * range;
c_MA= sqrt((x2_MA- x1_MA)*(x2_MA- x1_MA) + (y2_MA- y1_MA)*(y2_MA- y1_MA));
angle_MA= round(180 * acos((x2_MA - x1_MA)/c_MA) / PI);
angle_MA= IIf(y2_MA> 0, - angle_MA, angle_MA);
Col=IIf(angle_MA>3,colorWhite,IIf(angle_MA<(-3),colorRed,colorBlack));
Plot(EMA( P,200), _DEFAULT_NAME(), Col, ParamStyle("Style") );










/*
The basic definition of an 'up' fractal is a bar high that is both higher than the two bars immediately preceding it
and higher than the two bars immediately following it.
The lows of the bars are NOT considered in determining the up fractal progression.

If two bars in the progression have equal highs followed by two consecutive bars with lower highs,
then a total of six bars rather than the usual five bars will make up the progression.
The first High becomes the counting fractal. Reverse for 'down' fractals.

The 5 bar formation works best on Daily or longer time frame charts.For intraday data charts we often use 9 bar, 13 bar and 21 bar formations for fractal counting
*/
Up5BarFractal = Ref(H,-2) < H AND Ref(H,-1) < H AND Ref(H,1) < H AND Ref(H,2) < H;
Up6BarFractal = Ref(H,-2) < H AND Ref(H,-1) < H AND (H == Ref(H,1)) AND Ref(H,2) < H AND Ref(H,3) < H;
Down5BarFractal = Ref(L,-2) > L AND Ref(L,-1) > L AND Ref(L,1) > L AND Ref(L,2) > L;
Down6BarFractal = Ref(L,-2) > L AND Ref(L,-1) > L AND (L == Ref(L,1)) AND Ref(L,2) > L AND Ref(L,3) > L;

//TODO: More filtering: Show only troughs that are around atrough in trix(9).

PlotShapes( IIf(Down5BarFractal ,shapeSmallUpTriangle,0) ,colorBlack, 0, L,-12);
PlotShapes( IIf(Down6BarFractal ,shapeSmallUpTriangle,0) ,colorBlack, 0, L,-12);

PlotShapes( IIf(Up5BarFractal ,shapeSmallDownTriangle,0) ,colorBlack, 0, H,-12);
PlotShapes( IIf(Up6BarFractal ,shapeSmallDownTriangle,0) ,colorBlack, 0, H,-12);

Up = (Up5BarFractal OR Up6BarFractal);
Down = (Down5BarFractal OR Down6BarFractal);
//Removing false fractals:
DownSignal = Flip(Ref(Up,-1), Ref(Down,-1));
UpSignal = Flip(Ref(Down,-1), Ref(Up,-1));

LastHigh[0] = H[0];
LastLow[0] = L[0];

LastLowIndex = 0;
LastHighIndex = 0;
Valid = 0;
for (i=1; i < BarCount; i++)
{

LastHigh[i] = LastHigh[i-1];
LastLow[i] = LastLow[i-1];
if (Up[i])
{
Valid[i] = True;
if (DownSignal[i])
{
//Sequence of 2 Up Fractals. Validate only the higher one.
Valid[i] = H[i] >= H[LastHighIndex];
Valid[LastHighIndex] = H[LastHighIndex] > H[i];
}
LastHigh[i] = Max(H[i], H[LastHighIndex ]);
LastHighIndex = i;
}

if (Down[i])
{
Valid[i] = True;
if (UpSignal[i])
{
//Sequence of 2 Down Fractals. Validate only the lower one.
Valid[i] = L[i] <= L[LastLowIndex];
Valid[LastLowIndex] = L[LastLowIndex] < L[i];
}

LastLow[i] = Min(L[i], L[LastLowIndex]);
LastLowIndex = i;
}
}

TrixN = Trix(9);
TroughLow = Ref(TrixN, -3) > TrixN AND Ref(TrixN, -2) > TrixN AND Ref(TrixN, -1) > TrixN AND Ref(TrixN, 1) > TrixN AND Ref(TrixN, 2) > TrixN AND Ref(TrixN, 3) > TrixN;
TroughHigh = Ref(TrixN, -3) < TrixN AND Ref(TrixN, -2) < TrixN AND Ref(TrixN, -1) < TrixN AND Ref(TrixN, 1) < TrixN AND Ref(TrixN, 2) < TrixN AND Ref(TrixN, 3) < TrixN;
//TroughLow = Ref(TrixN, -2) > TrixN AND Ref(TrixN, -1) > TrixN AND Ref(TrixN, 1) > TrixN AND Ref(TrixN, 2) > TrixN;
//TroughHigh = Ref(TrixN, -2) < TrixN AND Ref(TrixN, -1) < TrixN AND Ref(TrixN, 1) < TrixN AND Ref(TrixN, 2) < TrixN;
ZeroValid = Cross(TrixN, 0) OR Cross(0, TrixN) OR Ref(Cross(TrixN, 0),1) OR Ref(Cross(0, TrixN),1);
ValidLow = TroughLow OR Ref(TroughLow, 1) OR Ref(TroughLow, 2) OR Ref(TroughLow, 3) OR Ref(TroughLow, 4);// OR Ref(TroughLow, 5));
ValidHigh = TroughHigh OR Ref(TroughHigh, 1) OR Ref(TroughHigh, 2) OR Ref(TroughHigh, 3) OR Ref(TroughHigh, 4);// OR Ref(TroughHigh, 5));

//Plot(LastHigh-10 ,"LastHigh", colorBlue, styleLine);
//Plot(LastLow-10 ,"LastLow ", colorRed, styleLine);
//Plot(Valid*5 + 10 ,"LastLow ", colorGreen, styleLine | styleThick);

//PlotShapes( IIf(Down AND Valid,shapeSmallUpTriangle,0) ,colorGreen, 0, L,-12);
//PlotShapes( IIf(Up AND Valid,shapeSmallDownTriangle,0) ,colorRed, 0, H,-12);
Maxi = Up AND (ValidHigh OR ZeroValid);
Mini = Down AND (ValidLow OR ZeroValid);
PlotShapes( IIf(Down AND (ValidLow OR ZeroValid),shapeSmallUpTriangle,0) ,colorBlue, 0, L,-12);
PlotShapes( IIf(Up AND (ValidHigh OR ZeroValid),shapeSmallDownTriangle,0) ,colorOrange, 0, H,-12);

AlertIf(Down AND (ValidLow OR ZeroValid), "SOUND C:\\Windows\\Media\\Chord.wav", "Audio alert", 2);
AlertIf(Up AND (ValidHigh OR ZeroValid), "SOUND C:\\Windows\\Media\\Ding.wav", "Audio alert", 2);
//Plot(UpSignal*3+5,"UpSignal", colorBlue, styleLine| styleThick);
//Plot(DownSignal*3 ,"DownSignal", colorRed, styleLine| styleThick);

/*
LastMaxi = 0;
LastMini = 0;
ElliotLines = 0;
State = 0;
for (i=1; i < BarCount; i++)
{
State[i] = State[i-1];
if (Maxi[i])
{
State[i] = 1;//down
}

if (Mini[i])
{
State[i] = 2;
}

}

PlotShapes(IIf(State > 0, shapeSmallCircle, 0), IIf(State == 1, colorRed, colorBlue), 0, IIf(State == 1, H, L), -5);
*/
//Line = LineArray( x0, y0, x1, y1, 1 );
//Plot( Line, "Trend line", colorBlue );

/*
Wave B
Usually 50% of Wave A
Should not exceed 75% of Wave A
Wave C
either 1 x Wave A
or 1.62 x Wave A
or 2.62 x Wave A
*/
function CorrectiveRatios(StartPrice, A, B, C, RatioDelta, Delta)
{

ALength = abs(startPrice - A); BLength = abs(A-B);
CLength = abs(B-C);

Ratio1 = BLength / CLength ;
Cond1 = Ration1 >= 0.5 - RatioDelta AND ratio1 <= 0.75 + RatioDelta;
Cond2 = abs(Clength - ALength) < Delta OR abs(Clength - 1.62 * ALength) < Delta OR abs(CLength - 2.62 * ALength) < Delta;

return Cond1 AND Cond2;
}

function ImpulseRules(StartPrice, One, Two, Three, Four, Five)
{
//Wave 2 should be beneath wave 1 start:
Cond1 = Two > StartPrice AND Two < One;
//Wave 4 - the same:
Cond2 = Four > Two AND Four < Three;
//Wave 5 should be <= wave 3
Cond3 = abs(Three-Two) >= abs(Five - Four);
//Wave 1 should be smaller than wave five, making wave 3 the biggest:
Cond4 = abs(StartPrice - One) < abs(Five - Four);
return Cond1 AND Cond2 AND Cond3 AND Cond4;
}

_SECTION_BEGIN("EMA1");
P = ParamField("Price field",-1);
_SECTION_END();

PI = atan(1.00) * 4;
periods = 30;
HighHigh = HHV(H, periods);
LowLow = LLV(L, periods);
range = 25 / (HighHigh - LowLow) * LowLow;
MA1= EMA(C,200);
x1_MA = 0;
x2_MA= 1;
y1_MA= 0;
y2_MA= (Ref(MA1, -1) - MA1) / Avg * range;
c_MA= sqrt((x2_MA- x1_MA)*(x2_MA- x1_MA) + (y2_MA- y1_MA)*(y2_MA- y1_MA));
angle_MA= round(180 * acos((x2_MA - x1_MA)/c_MA) / PI);
angle_MA= IIf(y2_MA> 0, - angle_MA, angle_MA);
Col=IIf(angle_MA>3,colorWhite,IIf(angle_MA<(-3),colorRed,colorBlack));
Plot(EMA( P,200), _DEFAULT_NAME(), Col, ParamStyle("Style") );


_SECTION_BEGIN("Natraj EOD Tech Chart");
GraphXSpace = 15;_SECTION_BEGIN("???? ?????");
r1 = Param( "Fast avg", 11, 3, 20, 1 );
r2 = Param( "Slow avg", 35, 10, 35, 1 );
r3 = Param( "Signal avg", 6, 3, 20, 1 );
ml = MACD(r1, r2);
sl = Signal(r1,r2,r3);
Hst = ml-sl;
A1=EMA(C,4)-EMA(C,34);
BBtops=BBandTop(A1,10,1);
BBbots=BBandBot(A1,10,1);

Color_bar=IIf(a1>BBtops, colorBlue,IIf(a1<BBbots,colorRed,colorYellow));

bbtop = BBandTop( Hst, 10, 1 );
bbbot = BBandBot( Hst, 10,1 );

Color = IIf (Hst > BBtop,colorBlue,IIf(hst < bbbot,colorRed, IIf (Hst > 0,colorBlue,colorRed)));Buy = Cross (Hst,bbtop);Sell = Cross (bbtop,Hst);Short = Cross (bbbot,Hst);Cover = Cross (Hst,bbbot);
Plot (Close,"close",Color_bar,styleCandle);



_SECTION_BEGIN("EMA1");
P = ParamField("Price field",-1);
_SECTION_END();

PI = atan(1.00) * 4;
periods = 30;
HighHigh = HHV(H, periods);
LowLow = LLV(L, periods);
range = 25 / (HighHigh - LowLow) * LowLow;
MA1= EMA(C,200);
x1_MA = 0;
x2_MA= 1;
y1_MA= 0;
y2_MA= (Ref(MA1, -1) - MA1) / Avg * range;
c_MA= sqrt((x2_MA- x1_MA)*(x2_MA- x1_MA) + (y2_MA- y1_MA)*(y2_MA- y1_MA));
angle_MA= round(180 * acos((x2_MA - x1_MA)/c_MA) / PI);
angle_MA= IIf(y2_MA> 0, - angle_MA, angle_MA);
Col=IIf(angle_MA>3,colorWhite,IIf(angle_MA<(-3),colorRed,colorBlack));
Plot(EMA( P,200), _DEFAULT_NAME(), Col, ParamStyle("Style") );


_SECTION_BEGIN("Intraday System_Candle_Alerts BS on 200 ema");
/* Intraday template */

GraphXSpace = 3 ;

/* These are the calcs for the oscilator values and plots the paint
bars*/
Osc = EMA(C,8) - EMA(C,34);
acc = Osc - EMA(Osc,13);
col = IIf(Osc > Ref(Osc,-1) AND acc > Ref(acc,-1),colorTurquoise,IIf(Osc < Ref(Osc,-1) AND acc < Ref(acc,-1),colorTan,colorLightBlue));
barcolor= 1;
Plot( Close, "Intraday Template" ,col/barcolor, styleCandle,styleThick|styleNoLabel);
// this sets the color of the body of the candlesticks to default

//---------------------------------------------------------------------------------

/* This is the code for the exponential moving average flipper */

mov = 200;
hi = EMA(H,mov);
lo = EMA(L,mov) ;
x1 = IIf(C>Ref(hi,-1),1,IIf(C<Ref(lo,-1),-1,0));
x2 = ValueWhen(x1!=0,x1,1);
st = IIf(x2==-1,Hi,Lo);
//Plot(st,"",colorYellow,styleNoLine|styleDots);
Buy=Cross(C,st);
Sell=Cross( Signal(), MACD() ) OR TimeNum()>151500;
Short=Cross(st,C);
Cover=Cross( MACD(), Signal() ) OR TimeNum()>151500;
shape = Buy * shapeUpTriangle + Short * shapeDownTriangle;
AlertIf( Short, "SOUND C:\\Windows\\Media\\ringout.wav", "Audio alert", 2 );
AlertIf( Buy, "SOUND C:\\Windows\\Media\\ringout.wav", "Audio alert", 2 );
PlotShapes( shape, IIf( Buy, colorYellow, colorCustom12 ),0, IIf( Buy, Low,
High ) );

GraphXSpace = 5;
dist = 2.5*ATR(10);

for( i = 0; i < BarCount; i++ )
{
if( Buy[i] ) PlotText( "Buy\n@" + C[ i ], i, L[ i ]-dist[i], colorGreen
);
if( Short[i] ) PlotText( "Short\n@" + C[ i ], i, H[ i ]+dist[i],
colorRed);
}
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g,
Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C,SelectedValue( ROC( C,
1 ) ) ));


//---------------------------------------------------------------------------------

/* This next code calculates the previous days high, low and close */

Hi1 =
IIf(Day()!=Ref(Day(),-1),Ref(HighestSince(Day()!=Ref(Day(),-1),H,1),-1),0);
Hi = ValueWhen(Day()!=Ref(Day(),-1),Hi1,1);
Lo1 =
IIf(Day()!=Ref(Day(),-1),Ref(LowestSince(Day()!=Ref(Day(),-1),L,1),-1),0);
Lo = ValueWhen(Day()!=Ref(Day(),-1),Lo1,1);
Cl1 = IIf(Day()!=Ref(Day(),-1),Ref(C,-1),0);
Cl = ValueWhen(Day()!=Ref(Day(),-1),Cl1,1);

/*This code calculates the time left in the bar*/

//File: TimeLeft in Bar
//Sept 20, 2005
// Compute Time Left In Bar
//

BarTime1 = LastValue(TimeNum() - Now(4));
DataError = IIf(Now(4) > TimeNum(),True,False);
TimeBase = IIf(Interval(1)>0,1,0);


_N(StrBarTime = NumToStr(BarTime1,1.0,False));
BT_Length = StrLen(StrBarTime);


_N(TimeLeft_ = WriteIf(BT_Length==1,"0:0"+StrBarTime,WriteIf(BT_Length==2,"0:"+StrBarTime,
WriteIf(BT_Length==3,StrLeft(StrBarTime,1)+":"+StrRight(StrBarTime,2),
StrLeft(StrBarTime,2)+":"+StrRight(StrBarTime,2))) ));

TimeLeft = WriteIf(TimeBase==1,TimeLeft_,"N/A");



//////////////////////////////////////////////////////////////////////////////
Filter=Buy OR Short;

AddColumn( IIf(Buy,1,IIf(Short,-1,Null)) ,"Buy/Short",1.0,colorWhite,IIf(Buy,colorDarkGreen,IIf(Short,colorRed,Null)),100);
AddColumn( IIf(Cover,2,IIf(Sell,-2,Null)) ,"Cover/Sell",1.0,colorWhite,IIf(Cover,colorLightBlue,IIf( Sell,colorCustom12,Null)),100);




_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | styleHidden | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

_SECTION_BEGIN("BB_double_(H+L)_20");



////BOL BAND 18////////////////////////////////////////////////////////




P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 100, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );


M = (H+L)/2;

BT = BBandTop( M, 20, 1.5 );
BB = BBandBot( M, 20, 1.5 );

BColor = ColorRGB(5,125,150);
//Plot( BT, "BBTop" + _PARAM_VALUES(), BColor, styleDots|styleThick|styleNoLabel);
//Plot( BB, "BBBot" + _PARAM_VALUES(), BColor, styleDots|styleThick|styleNoLabel);



BT1 = BBandTop( M, 20, 2.2 );
BB1 = BBandBot( M, 20, 2.2 );
//Plot( BT1, "BBTop1" + _PARAM_VALUES(), BColor, styleDots|styleNoLabel);
//Plot( BB1, "BBBot1" + _PARAM_VALUES(), BColor, styleDots|styleNoLabel);

PlotOHLC( 0, BT1 , BT , BT , "Cloud", IIf(BT1 > BT ,ColorRGB(25,25,100),colorDarkTeal), styleCloud | styleNoLabel);

PlotOHLC( 0, BB , BB1 , BB1 , "Cloud", IIf(BB > BB1 ,ColorRGB(25,25,100),colorDarkTeal), styleCloud | styleNoLabel);

_SECTION_END();Plot(EMA(C,20),"",IIf(C > EMA(C,20),colorBrightGreen,colorRed),styleLine|styleThick);


_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();


_SECTION_BEGIN("BBands");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 100, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );
Color = ParamColor("Color", colorWhite );
Color = ColorBlend( Color, GetChartBkColor(), 0.5 );
Style = ParamStyle("Style", styleLine | styleNoLabel ) | styleNoRescale;;
Plot( bbt = BBandTop( P, Periods, Width ), "BBTop" + _PARAM_VALUES(), Color, Style );
Plot( bbb = BBandBot( P, Periods, Width ), "BBBot" + _PARAM_VALUES(), Color, Style );
PlotOHLC( bbt, bbt, bbb, bbb, "", ColorBlend( Color, GetChartBkColor(), 0.7 ), styleNoLabel | styleCloud | styleNoRescale, Null, Null, Null, -1 );
_SECTION_END();



رد مع اقتباس
قديم 01-09-2018, 02:08 PM
  المشاركه #35

عضو هوامير المميز

تاريخ التسجيل: Apr 2012
المشاركات: 194
amm1430 غير متواجد حالياً  

رد: معادلات للمضارب اللحظي على الايمى بروكر


_SECTION_BEGIN("MFI");
periods = Param( "Periods", 14, 2, 200, 1 );
Plot( MFI(periods), _DEFAULT_NAME(), ParamColor("Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();

_SECTION_BEGIN("EMA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 100, 2, 200, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
_SECTION_BEGIN("MFI");
periods = Param( "Periods", 14, 2, 200, 1 );
Plot( MFI(periods), _DEFAULT_NAME(), ParamColor("Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();

_SECTION_BEGIN("EMA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 100, 2, 200, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
Graph0=50;
Graph1=70;




_SECTION_BEGIN("RSI trendline ");
// RSI trendline formula ver 1.0

SetBarsRequired(sbrAll, sbrAll);
TP = Param("Trend Per", 300,2,1000);
per_RSI= Param("RSI Per", 9, 7, 35,1);
IND = RSI(per_RSI);
Center = 50 ;

Plot( RSI(per_RSI), "", 4, 4);
Plot(50,"",1,1) ;

// CALCULATE UPTREND

startvalue = LastValue( LLV( IND, TP ) );
startbar = LastValue( ValueWhen( IND == startvalue, BarIndex(), 1) );
BP = BarCount - Startbar;

secondvalue = LastValue( LLV( IND, BP - 5 ) );
secondbar = LastValue( ValueWhen( IND == secondvalue, BarIndex(), 1) );
BP2 = BarCount - secondbar;

thirdvalue = LastValue( LLV( IND, BP2 - 5 ) );
thirdbar = LastValue( ValueWhen( IND == thirdvalue, BarIndex(), 1) );
BP3 = BarCount - thirdbar;

fourthvalue = LastValue( LLV( IND, BP3 - 5 ) );
fourthbar = LastValue( ValueWhen( IND ==fourthvalue, BarIndex(), 1) );
BP4 = BarCount - fourthbar;

fifthvalue = LastValue( LLV( IND, BP4 - 5 ) );
fifthbar = LastValue( ValueWhen( IND ==fifthvalue, BarIndex(), 1) );
BP5 = BarCount - fifthbar;

sixthvalue = LastValue( LLV( IND, BP5 - 5 ) );
sixthbar = LastValue( ValueWhen( IND ==sixthvalue, BarIndex(), 1) );

Low_1= IIf( BarIndex() == startbar, 80, Null);
Low_2= IIf( BarIndex() == secondbar, 80, Null);
Low_3= IIf( BarIndex() == thirdbar, 80, Null);
Low_4= IIf( BarIndex() == fourthbar, 80, Null);
Low_5= IIf( BarIndex() == fifthbar, 80, Null);
Low_6= IIf( BarIndex() == sixthbar, 80, Null);

b = startvalue ;
FirstSlope = (secondvalue - b) / (secondbar - startbar) ;
FirstTrendline = FirstSlope * ( BarIndex() - startbar ) + b;
// Plot( IIf( BarIndex() >= startbar AND FirstTrendline <= 90 , FirstTrendline, Null ) , "FirstTrendline", colorGreen, styleThick +2048 );

SecondSlope = (thirdvalue - b) / (thirdbar - startbar) ;
SecondTrendline = SecondSlope * ( BarIndex() - startbar ) + b;

ThirdSlope = (fourthvalue - b) / (fourthbar - startbar) ;
ThirdTrendline = ThirdSlope * ( BarIndex() - startbar ) + b;

FourthSlope = (fifthvalue - b) / (fifthbar - startbar) ;
FourthTrendline = FourthSlope * ( BarIndex() - startbar ) + b;

FifthSlope = (sixthvalue - b) / (sixthbar - startbar) ;
FifthTrendline = FifthSlope * ( BarIndex() - startbar ) + b;

MainSlope = IIf( FirstSlope > SecondSlope, IIf( SecondSlope > ThirdSlope, IIf( ThirdSlope > FourthSlope,
IIf( FourthSlope > FifthSlope, FifthSlope, FourthSlope),ThirdSlope), SecondSlope), FirstSlope) ;

MainLine = MainSlope * ( BarIndex() - startbar ) + b;
Plot( IIf( BarIndex() >= startbar, MainLine, Null ) , "MainLine", colorDarkGreen, styleThick ) ;


IND_Diff = IIf( BarIndex() >= startbar, abs( IND - MainLine), Null) ;
MainTrendLine_Diff = Param("Difference IND from MainTrendLine", 2.5, 0.5,5, 0.5);

Cond_Buy = IIf( BarIndex() >= Thirdbar AND IND_Diff <= MainTrendLine_Diff, IND, 0) AND MainLine < 55 ;

PlotShapes( IIf( Cond_Buy, shapeUpArrow , shapeNone ), colorGreen );



/////////////////////////////////////////////

// CALCULATE DOWNTREND

starthigh = LastValue( HHV( IND, TP ) );
starthighbar = LastValue( ValueWhen( IND == starthigh, BarIndex(), 1) );
HBP = BarCount - starthighbar;

secondhigh = LastValue( HHV( IND, HBP - 5 ) );
secondhighbar = LastValue( ValueWhen( IND == secondhigh, BarIndex(), 1) );
HBP2 = BarCount - secondhighbar;

thirdhigh = LastValue( HHV( IND, HBP2 - 5 ) );
thirdhighbar = LastValue( ValueWhen( IND == thirdhigh, BarIndex(), 1) );
HBP3 = BarCount - thirdhighbar;

fourthhigh = LastValue( HHV( IND, HBP3 - 5 ) );
fourthhighbar = LastValue( ValueWhen( IND ==fourthhigh, BarIndex(), 1) );
HBP4 = BarCount - fourthhighbar;

fifthhigh = LastValue( HHV( IND, HBP4 - 5 ) );
fifthhighbar = LastValue( ValueWhen( IND ==fifthhigh, BarIndex(), 1) );
HBP5 = BarCount - fifthhighbar;

sixthhigh = LastValue( HHV( IND, HBP5 - 5 ) );
sixthhighbar = LastValue( ValueWhen( IND ==sixthhigh, BarIndex(), 1) );

High_1= IIf( BarIndex() == starthighbar, 90, Null);
High_2= IIf( BarIndex() == secondhighbar, 90, Null);
High_3= IIf( BarIndex() == thirdhighbar, 90, Null);
High_4= IIf( BarIndex() == fourthhighbar, 90, Null);
High_5= IIf( BarIndex() == fifthhighbar, 90, Null);
High_6= IIf( BarIndex() == sixthhighbar, 90, Null);

MainTrendLine_Diff = Param("Difference IND from MainTrendLine", 2.5, 0.5,7, 0.5);

d = starthigh ;
FirstDownSlope = (secondhigh - d) / (secondhighbar - starthighbar) ;
FirstDownTrendline = FirstDownSlope * ( BarIndex() - starthighbar ) + d;

SecondDownSlope = (thirdhigh - d) / (thirdhighbar - starthighbar) ;
SecondDownTrendline = SecondDownSlope * ( BarIndex() - starthighbar ) + d;

ThirdDownSlope = (fourthhigh - d) / (fourthhighbar - starthighbar) ;
ThirdDownTrendline = ThirdDownSlope * ( BarIndex() - starthighbar ) + d;

FourthDownSlope = (fifthhigh - d) / (fifthhighbar - starthighbar) ;
FourthDownTrendline = FourthDownSlope * ( BarIndex() - starthighbar ) + d;

FifthDownSlope = (sixthhigh - d) / (sixthhighbar - starthighbar) ;
FifthDownTrendline = FifthDownSlope * ( BarIndex() - starthighbar ) + d;

MainDownSlope = IIf( FirstDownSlope < SecondDownSlope, IIf( SecondDownSlope < ThirdDownSlope,
IIf( ThirdDownSlope < FourthDownSlope, IIf( FourthDownSlope < FifthDownSlope, FifthDownSlope, FourthDownSlope),ThirdDownSlope), SecondDownSlope), FirstDownSlope) ;

MainDownLine = IIf( MainDownSlope == 0, Null, MainDownSlope * ( BarIndex() - starthighbar ) + d ) ;
Plot( IIf( BarIndex() >= starthighbar, MainDownLine, Null ) , "Main_DOWN_Line", colorViolet, styleThick ) ;

IND_Diff = IIf( BarIndex() >= starthighbar, abs( IND - MainDownLine), Null) ;

Cond_Sell = IIf( BarIndex() >= Thirdbar AND IND_Diff <= MainTrendLine_Diff, IND, 0) AND MainDownLine > 45 ;

PlotShapes( IIf( Cond_Sell, shapeDownArrow , shapeNone ), colorRed );


Title = Name() + "\\c17" + " " +"\\c12" + "RSI" + " " + per_RSI ;
_SECTION_END();



رد مع اقتباس
قديم 01-09-2018, 02:14 PM
  المشاركه #36

عضو هوامير المميز

تاريخ التسجيل: Apr 2012
المشاركات: 194
amm1430 غير متواجد حالياً  

رد: معادلات للمضارب اللحظي على الايمى بروكر


Plot(RSI(14),"",colorYellow,4);
Plot(RSI(34),"",colorBlue,4);
Plot(RSI(55),"",colorWhite,4);
Plot(RSI(100),"",colorRed,4);

Buy=Cross(RSI(14),RSI(34));
Sell=Cross(RSI(34),RSI(14));
PlotShapes(IIf(Buy,shapeSmallUpTriangle,shapeNone),colorWhite,0,RSI(14),-12);
PlotShapes(IIf(Sell,shapeSmallDownTriangle, shapeNone),colorWhite,0,RSI(14),-12);

_SECTION_BEGIN("Exploration");
Filter=Close;
Var = WriteIf(Buy,"BUY",WriteIf(Sell,"SELL",""));
AddTextColumn(Var , "Buy/Sell", 1.2 , colorWhite, IIf( Buy, colorBlue,IIf(Sell,colorRed,colorWhite) ));
_SECTION_END();



رد مع اقتباس
قديم 02-09-2018, 05:07 PM
  المشاركه #37

عضو هوامير المميز

تاريخ التسجيل: Aug 2005
المشاركات: 1,777
غنيمة غير متواجد حالياً  

رد: معادلات للمضارب اللحظي على الايمى بروكر


بارك الله فيك وماقصرت


رد مع اقتباس
قديم 05-09-2018, 12:37 AM
  المشاركه #38

عضو هوامير المميز

تاريخ التسجيل: Jan 2017
المشاركات: 17
bohaneen11 غير متواجد حالياً  

رد: معادلات للمضارب اللحظي على الايمى بروكر


معادلة العرض والطلب

_SECTION_BEGIN("Supply and Demand Zone");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );

g = Param( "No.of Lines", 7, 1, 7, 1 );
x = Cum( 1 );

pk = BarsSince( H >= Ref( H, -1 ) AND H >= Ref( H, -2 ) AND H >= Ref( H, -3 ) AND H >= Ref( H, -4 ) AND H >= Ref( H, 1 ) AND H >= Ref( H, 2 ) AND H >= Ref( H, 3 ) AND H >= Ref( H, 4 ) ) == 0;
tk = BarsSince( L <= Ref( L, -1 ) AND L <= Ref( L, -2 ) AND L <= Ref( L, -3 ) AND L <= Ref( L, -4 ) AND L <= Ref( L, 1 ) AND L <= Ref( L, 2 ) AND L <= Ref( L, 3 ) AND L <= Ref( L, 4 ) ) == 0;

px1 = LastValue( ValueWhen( pk, x, 1 ) );
px2 = LastValue( ValueWhen( Pk, x, 2 ) );
px3 = LastValue( ValueWhen( Pk, x, 3 ) );
px4 = LastValue( ValueWhen( pk, x, 4 ) );
px5 = LastValue( ValueWhen( Pk, x, 5 ) );
px6 = LastValue( ValueWhen( Pk, x, 6 ) );
px7 = LastValue( ValueWhen( Pk, x, 7 ) );

tx1 = LastValue( ValueWhen( Tk, x, 1 ) );
tx2 = LastValue( ValueWhen( Tk, x, 2 ) );
tx3 = LastValue( ValueWhen( Tk, x, 3 ) );
tx4 = LastValue( ValueWhen( Tk, x, 4 ) );
tx5 = LastValue( ValueWhen( Tk, x, 5 ) );
tx6 = LastValue( ValueWhen( Tk, x, 6 ) );
tx7 = LastValue( ValueWhen( Tk, x, 7 ) );

XT1 = LastValue( ValueWhen( pk, H, 1 ) );
XT1c = LastValue( ValueWhen( pk, Max( C, O ), 1 ) );
XT2 = LastValue( ValueWhen( Pk, H, 2 ) );
XT2c = LastValue( ValueWhen( pk, Max( C, O ), 2 ) );
XT3 = LastValue( ValueWhen( Pk, H, 3 ) );
XT3c = LastValue( ValueWhen( pk, Max( C, O ), 3 ) );
XT4 = LastValue( ValueWhen( pk, H, 4 ) );
XT4c = LastValue( ValueWhen( pk, Max( C, O ), 4 ) );
XT5 = LastValue( ValueWhen( Pk, H, 5 ) );
XT5c = LastValue( ValueWhen( pk, Max( C, O ), 5 ) );
XT6 = LastValue( ValueWhen( Pk, H, 6 ) );
XT6c = LastValue( ValueWhen( pk, Max( C, O ), 6 ) );
XT7 = LastValue( ValueWhen( Pk, H, 7 ) );
XT7c = LastValue( ValueWhen( pk, Max( C, O ), 7 ) );

YT1 = LastValue( ValueWhen( tk, L, 1 ) );
YT1c = LastValue( ValueWhen( tk, Min( O, C ), 1 ) );
YT2 = LastValue( ValueWhen( tk, L, 2 ) );
YT2c = LastValue( ValueWhen( tk, Min( O, C ), 2 ) );
YT3 = LastValue( ValueWhen( tk, L, 3 ) );
YT3c = LastValue( ValueWhen( tk, Min( O, C ), 3 ) );
YT4 = LastValue( ValueWhen( tk, L, 4 ) );
YT4c = LastValue( ValueWhen( tk, Min( O, C ), 4 ) );
YT5 = LastValue( ValueWhen( tk, L, 5 ) );
YT5c = LastValue( ValueWhen( tk, Min( O, C ), 5 ) );
YT6 = LastValue( ValueWhen( tk, L, 6 ) );
YT6c = LastValue( ValueWhen( tk, Min( O, C ), 6 ) );
YT7 = LastValue( ValueWhen( tk, L, 7 ) );
YT7c = LastValue( ValueWhen( tk, Min( O, C ), 7 ) );

pk1 = IIf( x > px1 AND HHV( H, x - px1 )<XT1 AND g >= 1, XT1, Null );
pk1c = IIf( x > px1 AND HHV( H, x - px1 )<XT1 AND g >= 1, XT1c, Null );

for( i = BarCount - 1; i > px1; i-- )
{
if( H[i] > pk1[px1] )
{
pk1 = pk1c = Null;
}
}

Col1 = IIf( LastValue( C ) > pk1, ColorRGB( 14, 14, 100 ), ColorRGB( 180, 20, 20 ) );
PlotOHLC( 0, pk1, pk1c, 0, "", Col1, styleCloud | styleNoLabel, Null, Null, Null, -1 );

pk2 = IIf( x > px2 AND HHV( H, x - px2 )<XT2 AND g >= 2, XT2, Null );
pk2c = IIf( x > px2 AND HHV( H, x - px2 )<XT2 AND g >= 2, XT2c, Null );

for( i = BarCount - 1; i > px2; i-- )
{
if( H[i] > pk2[px2] )
{
pk2 = pk2c = Null;
}
}

Col2 = IIf( LastValue( C ) > pk2, ColorRGB( 24, 24, 120 ), ColorRGB( 180, 40, 40 ) );
PlotOHLC( 0, pk2, pk2c, 0, "", Col2, styleCloud | styleNoLabel, Null, Null, Null, -2 );

pk3 = IIf( x > px3 AND HHV( H, x - px3 )<XT3 AND g >= 3, XT3, Null );
pk3c = IIf( x > px3 AND HHV( H, x - px3 )<XT3 AND g >= 3, XT3c, Null );

for( i = BarCount - 1; i > px3; i-- )
{
if( H[i] > pk3[px3] )
{
pk3 = pk3c = Null;
}
}

Col3 = IIf( LastValue( C ) > pk3, ColorRGB( 34, 34, 140 ), ColorRGB( 180, 60, 60 ) );
PlotOHLC( 0, pk3, pk3c, 0, "", Col3, styleCloud | styleNoLabel, Null, Null, Null, -3 );

pk4 = IIf( x > px4 AND HHV( H, x - px4 )<XT4 AND g >= 4, XT4, Null );
pk4c = IIf( x > px4 AND HHV( H, x - px4 )<XT4 AND g >= 4, XT4c, Null );

for( i = BarCount - 1; i > px4; i-- )
{
if( H[i] > pk4[px4] )
{
pk4 = pk4c = Null;
}
}

Col4 = IIf( LastValue( C ) > pk4, ColorRGB( 44, 44, 160 ), ColorRGB( 180, 80, 80 ) );
PlotOHLC( 0, pk4, pk4c, 0, "", Col4, styleCloud | styleNoLabel, Null, Null, Null, -4 );

pk5 = IIf( x > px5 AND HHV( H, x - px5 )<XT5 AND g >= 5, XT5, Null );
pk5c = IIf( x > px5 AND HHV( H, x - px5 )<XT5 AND g >= 5, XT5c, Null );

for( i = BarCount - 1; i > px5; i-- )
{
if( H[i] > pk5[px5] )
{
pk5 = pk5c = Null;
}
}

Col5 = IIf( LastValue( C ) > pk5, ColorRGB( 54, 54, 180 ), ColorRGB( 180, 100, 100 ) );
PlotOHLC( 0, pk5, pk5c, 0, "", Col5, styleCloud | styleNoLabel, Null, Null, Null, -5 );

pk6 = IIf( x > px6 AND HHV( H, x - px6 )<XT6 AND g >= 6, XT6, Null );
pk6c = IIf( x > px6 AND HHV( H, x - px6 )<XT6 AND g >= 6, XT6c, Null );

for( i = BarCount - 1; i > px6; i-- )
{
if( H[i] > pk6[px6] )
{
pk6 = pk6c = Null;
}
}

Col6 = IIf( LastValue( C ) > pk6, ColorRGB( 64, 64, 200 ), ColorRGB( 180, 120, 120 ) );
PlotOHLC( 0, pk6, pk6c, 0, "", Col6, styleCloud | styleNoLabel, Null, Null, Null, -6 );

pk7 = IIf( x > px7 AND HHV( H, x - px7 )<XT7 AND g >= 7, XT7, Null );
pk7c = IIf( x > px7 AND HHV( H, x - px7 )<XT7 AND g >= 7, XT7c, Null );

for( i = BarCount - 1; i > px7; i-- )
{
if( H[i] > pk7[px7] )
{
pk7 = pk7c = Null;
}
}

Col7 = IIf( LastValue( C ) > pk7, ColorRGB( 74, 74, 220 ), ColorRGB( 180, 140, 140 ) );
PlotOHLC( 0, pk7, pk7c, 0, "", Col7, styleCloud | styleNoLabel, Null, Null, Null, -7 );

tl1 = IIf( x > tx1 AND LLV( L, x - tx1 ) > YT1 AND g >= 1, YT1, Null );
tl1c = IIf( x > tx1 AND LLV( L, x - tx1 ) > YT1 AND g >= 1, YT1c, Null );

for( i = BarCount - 1; i > tx1; i-- )
{
if( L[i] < tl1[tx1] )
{
tl1 = tl1c = Null;
}
}

Col1 = IIf( LastValue( C ) > tl1, ColorRGB( 14, 14, 100 ), ColorRGB( 180, 20, 20 ) );
PlotOHLC( 0, tl1, tl1c, 0, "", Col1, styleCloud | styleNoLabel, Null, Null, Null, -1 );

tl2 = IIf( x > tx2 AND LLV( L, x - tx2 ) > YT2 AND g >= 2, YT2, Null );
tl2c = IIf( x > tx2 AND LLV( L, x - tx2 ) > YT2 AND g >= 2, YT2c, Null );

for( i = BarCount - 1; i > tx2; i-- )
{
if( L[i] < tl2[tx2] )
{
tl2 = tl2c = Null;
}
}

Col2 = IIf( LastValue( C ) > YT2, ColorRGB( 24, 24, 120 ), ColorRGB( 180, 40, 40 ) );
PlotOHLC( 0, tl2, tl2c, 0, "", Col2, styleCloud | styleNoLabel, Null, Null, Null, -2 );

tl3 = IIf( x > tx3 AND LLV( L, x - tx3 ) > YT3 AND g >= 3, YT3, Null );
tl3c = IIf( x > tx3 AND LLV( L, x - tx3 ) > YT3 AND g >= 3, YT3c, Null );

for( i = BarCount - 1; i > tx3; i-- )
{
if( L[i] < tl3[tx3] )
{
tl3 = tl3c = Null;
}
}

Col3 = IIf( LastValue( C ) > YT3, ColorRGB( 34, 34, 140 ), ColorRGB( 180, 60, 60 ) );
PlotOHLC( 0, tl3, tl3c, 0, "", Col3, styleCloud | styleNoLabel, Null, Null, Null, -3 );

tl4 = IIf( x > tx4 AND LLV( L, x - tx4 ) > YT4 AND g >= 4, YT4, Null );
tl4c = IIf( x > tx4 AND LLV( L, x - tx4 ) > YT4 AND g >= 4, YT4c, Null );

for( i = BarCount - 1; i > tx4; i-- )
{
if( L[i] < tl4[tx4] )
{
tl4 = tl4c = Null;
}
}

Col4 = IIf( LastValue( C ) > YT4, ColorRGB( 44, 44, 160 ), ColorRGB( 180, 80, 80 ) );
PlotOHLC( 0, tl4, tl4c, 0, "", Col4, styleCloud | styleNoLabel, Null, Null, Null, -4 );

tl5 = IIf( x > tx5 AND LLV( L, x - tx5 ) > YT5 AND g >= 5, YT5, Null );
tl5c = IIf( x > tx5 AND LLV( L, x - tx5 ) > YT5 AND g >= 5, YT5c, Null );

for( i = BarCount - 1; i > tx5; i-- )
{
if( L[i] < tl5[tx5] )
{
tl5 = tl5c = Null;
}
}

Col5 = IIf( LastValue( C ) > YT5, ColorRGB( 54, 54, 180 ), ColorRGB( 180, 100, 100 ) );
PlotOHLC( 0, tl5, tl5c, 0, "", Col5, styleCloud | styleNoLabel, Null, Null, Null, -5 );

tl6 = IIf( x > tx6 AND LLV( L, x - tx6 ) > YT6 AND g >= 6, YT6, Null );
tl6c = IIf( x > tx6 AND LLV( L, x - tx6 ) > YT6 AND g >= 6, YT6c, Null );

for( i = BarCount - 1; i > tx6; i-- )
{
if( L[i] < tl6[tx6] )
{
tl6 = tl6c = Null;
}
}

Col6 = IIf( LastValue( C ) > YT6, ColorRGB( 64, 64, 200 ), ColorRGB( 180, 120, 120 ) );
PlotOHLC( 0, tl6, tl6c, 0, "", Col6, styleCloud | styleNoLabel, Null, Null, Null, -6 );

tl7 = IIf( x > tx7 AND LLV( L, x - tx7 ) > YT7 AND g >= 7, YT7, Null );
tl7c = IIf( x > tx7 AND LLV( L, x - tx7 ) > YT7 AND g >= 7, YT7c, Null );

for( i = BarCount - 1; i > tx7; i-- )
{
if( L[i] < tl7[tx7] )
{
tl7 = tl7c = Null;
}
}

Col7 = IIf( LastValue( C ) > YT7, ColorRGB( 74, 74, 220 ), ColorRGB( 180, 140, 140 ) );
PlotOHLC( 0, tl7, tl7c, 0, "", Col7, styleCloud | styleNoLabel, Null, Null, Null, -7 );

_SECTION_END();



رد مع اقتباس
قديم 05-09-2018, 08:49 AM
  المشاركه #39

عضو هوامير المميز

تاريخ التسجيل: Sep 2006
المشاركات: 1,877
تـــ شبح ــداول غير متواجد حالياً  

رد: معادلات للمضارب اللحظي على الايمى بروكر


جزاك الله خيرا


رد مع اقتباس
قديم 02-12-2018, 04:54 PM
  المشاركه #40

عضو هوامير المميز

تاريخ التسجيل: Apr 2012
المشاركات: 194
amm1430 غير متواجد حالياً  

رد: معادلات للمضارب اللحظي على الايمى بروكر


_SECTION_BEGIN("Natraj EOD Tech Chart");
GraphXSpace = 15;_SECTION_BEGIN("???? ?????");
r1 = Param( "Fast avg", 11, 3, 20, 1 );
r2 = Param( "Slow avg", 35, 10, 35, 1 );
r3 = Param( "Signal avg", 6, 3, 20, 1 );
ml = MACD(r1, r2);
sl = Signal(r1,r2,r3);
Hst = ml-sl;
A1=EMA(C,4)-EMA(C,34);
BBtops=BBandTop(A1,10,1);
BBbots=BBandBot(A1,10,1);

Color_bar=IIf(a1>BBtops, colorBlue,IIf(a1<BBbots,colorRed,colorYellow));

bbtop = BBandTop( Hst, 10, 1 );
bbbot = BBandBot( Hst, 10,1 );

Color = IIf (Hst > BBtop,colorBlue,IIf(hst < bbbot,colorRed, IIf (Hst > 0,colorBlue,colorRed)));Buy = Cross (Hst,bbtop);Sell = Cross (bbtop,Hst);Short = Cross (bbbot,Hst);Cover = Cross (Hst,bbbot);
Plot (Close,"close",Color_bar,styleCandle);






_SECTION_BEGIN("Name");

GfxSetOverlayMode(1);
GfxSelectFont("Tahoma", Status("pxheight")/8 );
GfxSetTextAlign( 6 );// center alignment
GfxSetTextColor(colorRed);
GfxSetBkMode(0); // transparent
GfxTextOut( Name(), Status("pxwidth")/2, Status("pxheight")/12 );
GfxSelectFont("Tahoma", Status("pxheight")/18 );
GfxSetTextColor(colorGrey40);
GfxTextOut( " Kulotskyman Trading ", Status("pxwidth")/2, Status("pxheight")/4 );

_SECTION_END();


_SECTION_BEGIN("MVWAP");
MVWAPAverage_TOGGLE = ParamToggle("MVWAP","Off|On",1);
MVWAP5 = MA(C*V,5)/ MA(V,5);
MVWAP20 = MA(C*V,20)/ MA(V,20);
MVWAP50 = MA(C*V,50)/ MA(V,50);
MVWAP100 = MA(C*V,100)/ MA(V,100);
MVWAP200 = MA(C*V,200)/ MA(V,200);
MVWAP250 = MA(C*V,250)/ MA(V,250);

MVWAPCross520 = MVWAP5>MVWAP20;
MVWAPCross520D = MVWAP5<MVWAP20;
MVWAPCross520B = Cross(MVWAP5,MVWAP20);
MVWAPCross520S = Cross(MVWAP20,MVWAP5);
MVWAPCross520Buybars = BarsSince(MVWAPCross520B);
MVWAPCross520Sellbars = BarsSince(MVWAPCross520S);
MVWAPCross520Since = IIf(MVWAPCross520,MVWAPCross520Buybars,MVWAPCross520Sellbars);
MVWAPCross520_Status = WriteIf(MVWAPCross520,"Bullish ",WriteIf(MVWAPCross520D,"Bearish ","N/A "));
MVWAPCross520_Color = IIf(MVWAPCross520,colorGreen,colorRed);

MVWAPCross2050 = MVWAP20>MVWAP50;
MVWAPCross2050D = MVWAP20<MVWAP50;
MVWAPCross2050B = Cross(MVWAP20,MVWAP50);
MVWAPCross2050S = Cross(MVWAP50,MVWAP20);
MVWAPCross2050Buybars = BarsSince(MVWAPCross2050B);
MVWAPCross2050Sellbars = BarsSince(MVWAPCross2050S);
MVWAPCross2050Since = IIf(MVWAPCross2050,MVWAPCross2050Buybars,MVWAPCross2050Sellbars);
MVWAPCross2050_Status = WriteIf(MVWAPCross2050,"Bullish ",WriteIf(MVWAPCross2050D,"Bearish ","N/A "));
MVWAPCross2050_Color = IIf(MVWAPCross2050,colorGreen,colorRed);

MVWAPCross50100 = MVWAP50>MVWAP100;
MVWAPCross50100D = MVWAP50<MVWAP100;
MVWAPCross50100B = Cross(MVWAP50,MVWAP100);
MVWAPCross50100S = Cross(MVWAP100,MVWAP50);
MVWAPCross50100Buybars = BarsSince(MVWAPCross50100B);
MVWAPCross50100Sellbars = BarsSince(MVWAPCross50100S);
MVWAPCross50100Since = IIf(MVWAPCross50100,MVWAPCross50100Buybars,MVWAPCross50100Sellbars);
MVWAPCross50100_Status = WriteIf(MVWAPCross50100,"Bullish ",WriteIf(MVWAPCross50100D,"Bearish ","N/A "));
MVWAPCross50100_Color = IIf(MVWAPCross50100,colorGreen,colorRed);

MVWAPCross50200 = MVWAP50>MVWAP200;
MVWAPCross50200D = MVWAP50<MVWAP200;
MVWAPCross50200B = Cross(MVWAP50,MVWAP200);
MVWAPCross50200S = Cross(MVWAP200,MVWAP50);
MVWAPCross50200Buybars = BarsSince(MVWAPCross50200B);
MVWAPCross50200Sellbars = BarsSince(MVWAPCross50200S);
MVWAPCross50200Since = IIf(MVWAPCross50200,MVWAPCross50200Buybars,MVWAPCross50200Sellbars);
MVWAPCross50200_Status = WriteIf(MVWAPCross50200,"Bullish ",WriteIf(MVWAPCross50200D,"Bearish ","N/A "));
MVWAPCross50200_Color = IIf(MVWAPCross50200,colorGreen,colorRed);

MVWAPCross50250 = MVWAP50>MVWAP250;
MVWAPCross50250D = MVWAP50<MVWAP250;
MVWAPCross50250B = Cross(MVWAP50,MVWAP250);
MVWAPCross50250S = Cross(MVWAP250,MVWAP50);
MVWAPCross50250Buybars = BarsSince(MVWAPCross50250B);
MVWAPCross50250Sellbars = BarsSince(MVWAPCross50250S);
MVWAPCross50250Since = IIf(MVWAPCross50250,MVWAPCross50250Buybars,MVWAPCross50250Sellbars);
MVWAPCross50250_Status = WriteIf(MVWAPCross50250,"Bullish ",WriteIf(MVWAPCross50250D,"Bearish ","N/A "));
MVWAPCross50250_Color = IIf(MVWAPCross50250,colorGreen,colorRed);

if(MVWAPAverage_TOGGLE==1)
{
Plot(MVWAP5,"MVWAP5",colorRed,styleThick);
Plot(MVWAP20,"MVWAP20",colorBlue,styleThick);
//Plot(MVWAP50,"MVWAP50",colorLime,styleThick);
Plot(MVWAP100,"MVWAP100",colorGold,styleThick);
//Plot(MVWAP200,"MVWAP200",colorTurquoise,styleThick);
//Plot(MVWAP250,"MVWAP250",colorPaleGreen,styleThick);
}

_SECTION_END();

Buy=MVWAPCross520B;
PlotShapes(shapeUpArrow*Buy,colorGreen);
Sell=MVWAPCross520S;
PlotShapes(shapeDownArrow*Sell,colorRed);



رد مع اقتباس
إضافة رد


مواقع النشر (المفضلة)

الكلمات الدلالية (Tags)
للمضارب, معادلات, اللحظي, الايمى, بروكر, على

أدوات الموضوع
انواع عرض الموضوع

تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة

الانتقال السريع



07:10 PM