أستاذ سمير
السلام عليكم
بعد التحية و الاحترام
برجاء انشاء اكسبيرت بالمدخلات ادناه و اجراء اى تحديثات مطلوبة (ان وجد)
مع خالص شكرى و تقديري
input h1=6,h2=23,MaxLoss=25, minilots = 1,offset=1,check=40;
vars currentbar = 1,stoch1min(series),t=0,t1=0,t2=0,longallowed(bool ),shortallowed(bool),i(number);
begin
currentbar := back(close);
if currentbar < check then return;
Fast_Stochastics(close,5,3);
stoch1min:=Fast_Stochastics.line_d;
t:=hour(timestamp[currentbar])*60;
t1:=h1*60;
t2:=h2*60;
longallowed:=false;
shortallowed:=false;
Bollinger_Bands(close,20,1);
if t>=t1 and t<=t2 and stoch1min[currentbar]< (20-offset) and low[currentbar]<Bollinger_Bands.line_lower[currentbar] and not short() and not long() then
begin
for i:=1 to check do
begin
if close[currentbar-5-i]<(close[currentbar]-0.0005) then longallowed:=true;
end;
if longallowed=true then
begin
buy(minilots);
end;
end;
if t>=t1 and t<=t2 and stoch1min[currentbar]> (80+offset) and high[currentbar]>Bollinger_Bands.line_upper[currentbar] and not short() and not long()then
begin
for i:=1 to check do
begin
if close[currentbar-5-i]>(close[currentbar]+0.0005) then shortallowed:=true;
end;
if shortallowed=true then
begin
sell(minilots);
end;
end;
Bollinger_Bands(close,20,2);
if short() and low[currentbar]<Bollinger_Bands.line_lower[currentbar] then exitshort();
if long() and high[currentbar]>Bollinger_Bands.line_upper[currentbar] then exitlong();
Bollinger_Bands(close,20,2);
if fpl()<-8000*minilots*(Bollinger_Bands.line_upper[currentbar]-Bollinger_Bands.line_lower[currentbar]) then
begin
if long() then begin alert("text","fpl BBS"); exitlong(); end;
if short() then begin alert("text","fpl BBS"); exitshort(); end;
end;
if fpl()<-MaxLoss*minilots then
begin
if long() then begin alert("text","max loss"); exitlong(); end;
if short() then begin alert("text","max loss"); exitshort(); end;
end;
end.