log in     sign up for free
 
The trading rules I live by are: 1. Cut losses. 2. Ride winners. 3. Keep bets small. 4. Follow the rules without question. 5. Know when to break the rules.
Ed Seykota
 
 
Home
systems (285)
 
 
Special offer: buy MetaStock (try for free)   |   Reuters QuoteCenter Real-Time Data (get a free month)   |   EOD Data
 

Buy

MetaStock

     (special offer)
 
 
 

Buy

EOD data for MetaStock

     (special offer)
 
 
 

Buy

Realtime data for MetaStock

     (special offer)
 
 
Formula Library
 
AmiBroker
MetaTrader
MetaStock
TradeStation
Wealth-Lab
NinjaTrader
 
add your formula
System Library
 
 
Account login
Your email:
Password:
 
Log in
New to s4t? Sign up.
If you forgot your password click here.
Search the Web
 
Custom Search

Bolliger Breakout Ver 1.0

System for: MetaTrader

 

 

Views:  2520

Added: November 16, 2008
 
Rate this code:  Rate: 1 Rate: 2 Rate: 3 Rate: 4 Rate: 5
This formula has not been rated yet
 
 

email this link

 
 
Tags: MetaTrader, system
 




Code:

/*[[
Name := Bollinger Breakout
Author := Lior Nabat
Lots := 1.00
Stop Loss := 50
Take Profit := 90
Trailing Stop := 50
Update on every tick:= Yes
]]*/

/*
HI,
This Expert use 3 rules:
1. Breakout of Bollinger and reversal
2. Waiting for crossing the 62 EMA
3. Enough space between the 200 SMA ( that sometimes act as support and resistance

Use only in EUR/USD and USD and CHF 15 min, not optimize yet.
gives very good results,
you can increase the lots and gain more profit.
it will be great to get feedback on my Email:

lior6@netvision.net.il

lior,

BTW, currently the trailing stop is not working...
*/


vars: Slippage(2);
defines: EMA(62),ShortFlag(0),LongFlag(0);

vars: sl(0),tp(0),p(0),q(0),s(0),mode(0),HighBar(0),LowBar(0),OpenBar(0),CloseBar(0),Shift(0),cnt(0);



If Bars<100 or TakeProfit<10 then Exit;
If IsIndirect(Symbol)=TRUE then Exit;

p=1.0*iATR(3,1); //p=TrailingStop*Point;BUY
q=1.0*iATR(3,1); //q=TrailingStop*Point;
s=1.0*Point;


If CurTime-LastTradeTime>60 and TotalTrades<1


then
{


if open[Shift+1]close[Shift] then
if Close[shift+1]> iBANDS(21,2,MODE_HIGH,Shift+1) then

// Checking the breakout and the reversal
{
ShortFlag=1;
LongFlag=0;
}

if ShortFlag and bid<= iMA(EMA,MODE_EMA,shift) and (close[shift] - iMA(200,MODE_SMA,Shift) > (15*point))
then
{
SetOrder(OP_SELL,Lots,bid,Slippage,Bid+StopLoss*Point,Bid-TakeProfit*Point,Red);
Alert ("Sell Short at: ",Bid,"S/L:",Bid+StopLoss*Point,"T/P: ",Bid-TakeProfit*Point);
ShortFlag=0;
Exit;
};
// checking the cross ...


//LONG TRADES ENTRY CRITERIA
if open[Shift+1]>close[Shift+1] and open[Shift] if Close[shift+1]
{
ShortFlag=0;
LongFlag=1;
}

if LongFlag and ask >= iMA(EMA,MODE_EMA,shift) and (iMA(200,MODE_SMA,Shift) - open[shift]> (15*point))

then

{
SetOrder(OP_BUY,Lots,Ask,Slippage,Ask-StopLoss*Point,Ask+TakeProfit*Point,Blue);

Alert ("Buy Long at: ",Ask,"S/L:",Ask-StopLoss*Point,"T/P: ",Ask+TakeProfit*Point);
LongFlag=0;
Exit;
};
};




if TrailingStop<5 then { print("Invalid trailing stop"); Exit; };
/* ????????? ????? ???????? ???????.
???????? ???? ???????? ????? ??????????? Stop Loss. */
for cnt=1 to TotalTrades
begin
/* ??? ??????? ???????? */
If Ord(cnt,VAL_TYPE)=OP_BUY then /* ??????? ??????? */
{
/* ??????? ???????? - ???? ?? ?????? ? ???? ?????? ?????? ???
??????? ???????? ?????? ????????? Bid, ??? ??? ??????? BUY */
If (Bid-Ord(cnt,VAL_OPENPRICE))>(TrailingStop*Point) then
{
/* ??, ??????? ????? ??????? ?????? ??? ???????? ???????? ?????
(???????? 30 ???????). ?????? ???? ?????????, ????? ??
????????? ???? ????? ??? ?? ??? ?????? */
If Ord(cnt,VAL_STOPLOSS)<(Bid-TrailingStop*Point) then
{
/* ?????? ???????? ?? ??????? Bid-Trailing Stop */
ModifyOrder(Ord(cnt,VAL_TICKET),Ord(cnt,VAL_OPENPRICE),
Bid-TrailingStop*Point,Ord(cnt,VAL_TAKEPROFIT),Red);
Exit; /* ???? ??????? - ???????. */
};
};
};
/* ??? ???????? ???????? */
If Ord(cnt,VAL_TYPE)=OP_SELL then
{
/* ??????? ???????? - ???? ?? ?????? ? ???? ?????? ?????? ???
??????? ???????? ?????? ????????? Ask, ??? ??? ??????? SELL */
If (Ord(cnt,VAL_OPENPRICE)-Ask)>(TrailingStop*Point) then
{
/* ??, ??????? ????? ??????? ?????? ??? ???????? ???????? ?????
(???????? 30 ???????). ?????? ???? ?????????, ????? ??
????????? ???? ????? ??? ?? ??? ?????? */
If Ord(cnt,VAL_STOPLOSS)>(Ask+TrailingStop*Point) or
Ord(cnt,VAL_STOPLOSS)=0 then /* ???????????? ???????!!! */
{
/* ?????? ???????? ?? ??????? Ask+Trailing Stop */
ModifyOrder(Ord(cnt,VAL_TICKET),Ord(cnt,VAL_OPENPRICE),
Ask+TrailingStop*Point,Ord(cnt,VAL_TAKEPROFIT),Red);
Exit;
};
};
};
end;


 




 

Code to difficult? Find somebody to help you with coding here.

 



Author: Lior Nabat
Source: www.xeatrade.com

 

View similar:

5min USDCHF
Awesome Oscillator auto Trader
2EMA system
ASC Trend ++ Expert(v.2.1)
2ways system
Always In Play
2EMA System-v03
B % oscillator system
Bolliger Breakout Ver 1.0
...
 
 
all systems for MetaTrader
all systems

 

 

Email to friend

Top

 

     
However we try to maintain hiqhest possible level of service - most formulas, oscillators, indicators
and systems are submitted by anonymous users.
Therefore S4T™ does not take any responsibility for it's quality.
If you use any of this information, use it at your own risk. You are responsible for your own trading decisions.
Be sure to verify that any information you see on these pages is correct, and is applicable to your particular trade.
In no case will S4T™ be responsible for your trading gains or losses.
PayPalSecure payments by PayPal S4T™ is a part of TAURO EDUCATION NETWORK
 
Privacy note | (c) copyrights systems4trading.com 2006-2009