<html><body>


<tt>
I came across this system on a SBFX forum. I have tried to program an<BR>
EA for it. (I am new to programming...) The system only opens buy<BR>
positions. I need a little help here from the collective brain here.<BR>
Here is the system and EA as I have programmed it...<BR>
<a href="http://www.strategybuilderfx.com/forums/showthread.php?t=15467">http://www.strategybuilderfx.com/forums/showthread.php?t=15467</a><BR>
<BR>
BINARIO (TRUCK)<BR>
<BR>
Binario is a trading idea, not a strategy that has been thoroughly<BR>
tested. It is a breakout entry, a trend follower method that can be<BR>
used in any time frame.<BR>
<BR>
This is nothing new but a very simple method. I hope it could be<BR>
useful for beginners. (Please, do back-tests and demo-trading before<BR>
using real money).<BR>
<BR>
The method should be coupled with proper money management.<BR>
<BR>
The rules, see below, are for the pairing GBP/USD, but I think they<BR>
will work with any currencies.<BR>
<BR>
The &quot;Binario&quot; lines are created by inserting into a 60 minute<BR>
bar/candlestick chart the following moving averages:<BR>
<BR>
- 144EMAH – 144 bar exponential moving average of the high<BR>
<BR>
- 144EMAL – 144 bar exponential moving average of the low<BR>
<BR>
The 144 ema's produce momentum over the short to medium term. And they<BR>
will provide the justification for triggering the trade.<BR>
<BR>
To avoid or reduce whipsaws, I use a filter of 25 pips for the pairing<BR>
GBP/USD on a 60 minute chart. The amount of 25 pips has been<BR>
arbitrarily chosen but in my opinion it's quite right for 60 minute<BR>
charts. This Filter (FFS) in not perfect. It can be increased or<BR>
decreased according to the volatility of the currency pair and the<BR>
time frame.<BR>
<BR>
I have no data or performances to show, except the one attached (paper<BR>
trading).<BR>
<BR>
Rules<BR>
<BR>
1. Wait for the prices action to come into the area of the &quot;Binario&quot;<BR>
and break the further away line, and<BR>
<BR>
2. Place an ENTRY STOP BUY order 25 pips + Spread (x pips) ABOVE the<BR>
upper &quot;Binario&quot; line<BR>
<BR>
3. Place an ENTRY STOP SELL order 25 pis BELOW the lower &quot;Binario&quot; line<BR>
<BR>
4. Set a STOP LOSS for LONG Entries 1 pip below the lower &quot;Binario&quot; line<BR>
<BR>
5. Set a STOP LOSS for SHORT entries 1 pip + spread above the upper<BR>
&quot;Binario line. The stop loss will be adjusted hourly or when necessary.<BR>
<BR>
6. Set a LIMIT to take xxx pips of profit. (I set profit to 850 pips.<BR>
This target has been determined by calculating the average of the two<BR>
biggest not realized profits. However the target can be determined by<BR>
any means).<BR>
<BR>
7. Both the current open position and the reverse position should be<BR>
adjusted as soon as EMA's value changes<BR>
<BR>
8. EXIT – The exit will trigger when the target is touched or when the<BR>
opposite (the further away) &quot;Binario&quot; Line is violated by 1 pip +<BR>
spread for SHORT position or by 1 pip for LONG position.<BR>
<BR>
9. When flat place Entry order as appropriate.<BR>
<BR>
Note: This strategy, like any trend-following method, requires taking<BR>
all trades to avoid missing a big run<BR>
<BR>
The test period is very short, so it is statistically insignificant .<BR>
Results showed below provide an example.<BR>
<BR>
I will attach a couple of charts to make myself clearer.<BR>
<BR>
<a href="http://rapidshare.de/files/6656775/...hments.pdf.html">http://rapidshare.de/files/6656775/...hments.pdf.html</a><BR>
<BR>
All the best in your trading,<BR>
<BR>
sencho<BR>
<BR>
<BR>
//+------------------------------------------------------------------+<BR>
//|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Copyright 2005, Gordago Software Corp. |<BR>
//|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.gordago.com/">http://www.gordago.com/</a> |<BR>
//+------------------------------------------------------------------+<BR>
 <BR>
#property copyright &quot;Coded by Don Lawson aka don_forex&quot;<BR>
#property link&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;<a href="http://www.gordago.com">http://www.gordago.com</a>&quot;<BR>
<BR>
extern int TakeProfit = 850;<BR>
extern int TrailingStop = 10;<BR>
extern int PipDifference = 25;<BR>
extern double Lots = 0.1;<BR>
extern double MaximumRisk = 10;<BR>
//+------------------------------------------------------------------+<BR>
//|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>
//+------------------------------------------------------------------+<BR>
int start(){<BR>
&nbsp;&nbsp; int cnt, ticket;<BR>
&nbsp;&nbsp; if(Bars&lt;100){<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Print(&quot;bars less than 100&quot;);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return(0);<BR>
&nbsp;&nbsp; }<BR>
&nbsp;&nbsp; if(TakeProfit&lt;10){<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Print(&quot;TakeProfit less than 10&quot;);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return(0);<BR>
&nbsp;&nbsp; }<BR>
<BR>
&nbsp;&nbsp; double MA144H=iMA(NULL,0,144,0,MODE_EMA,PRICE_HIGH,0);<BR>
&nbsp;&nbsp; double MA144L=iMA(NULL,0,144,0,MODE_EMA,PRICE_LOW,0);<BR>
&nbsp;&nbsp; double Spread=MarketInfo(NULL,MODE_SPREAD);<BR>
&nbsp;&nbsp; double BuyPrice=Ask+(Spread+PipDifference)*Point;<BR>
&nbsp;&nbsp; double BuyStopLoss=(MA144L*Point)-(1*Point);<BR>
&nbsp;&nbsp; double BuyTakeProfit=Ask+(PipDifference+TakeProfit)*Point;<BR>
&nbsp;&nbsp; double SellPrice=Bid-(Spread+PipDifference)*Point;<BR>
&nbsp;&nbsp; double SellStopLoss=(MA144H*Point)+(1*Point);<BR>
&nbsp;&nbsp; double SellTakeProfit=Bid-(PipDifference+TakeProfit)*Point;<BR>
&nbsp;&nbsp; double lot=NormalizeDouble(AccountFreeMargin()*MaximumRisk/50000,1);<BR>
&nbsp;&nbsp; int total=OrdersTotal();<BR>
&nbsp;&nbsp; if(total&lt;1){<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(AccountFreeMargin()&lt;(1000*lot)){<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Print(&quot;We have no money. Free Margin = &quot;, AccountFreeMargin());<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return(0);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double close=iClose(NULL,0,0);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (close&lt;MA144H &amp;&amp; close&gt;MA144L){<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>
ticket=OrderSend(Symbol(),OP_BUYSTOP,lot,BuyPrice,3,BuyStopLoss,BuyTakeProfit,<BR>
&quot;Binario&quot;,16384,0,Green);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(ticket&gt;0){<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES))<BR>
Print(&quot;BUY order opened : &quot;,OrderOpenPrice());<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else Print(&quot;Error opening BUY order : &quot;,GetLastError());<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return(0);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (close&lt;MA144H &amp;&amp; close&gt;MA144L){<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>
ticket=OrderSend(Symbol(),OP_SELLSTOP,lot,SellPrice,3,SellStopLoss,SellTakeProfit,&quot;Binario&quot;,16384,0,Red);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(ticket&gt;0) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES))<BR>
Print(&quot;SELL order opened : &quot;,OrderOpenPrice());<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else Print(&quot;Error opening SELL order : &quot;,GetLastError());<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return(0);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;&nbsp; }<BR>
&nbsp;&nbsp; for(cnt=0;cnt&lt;total;cnt++) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(OrderType()&lt;=OP_SELL &amp;&amp; OrderSymbol()==Symbol()) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(OrderType()==OP_BUY){<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (close&lt;BuyStopLoss){<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return(0);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(TrailingStop&gt;0) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(Bid-OrderOpenPrice()&gt;Point*TrailingStop) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(OrderStopLoss()&lt;Bid-Point*TrailingStop) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>
OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*TrailingStop,OrderTakeProfit(),0,Green);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return(0);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }else{<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (close&gt;SellStopLoss){<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OrderClose(OrderTicket(),OrderLots(),Ask,3,Violet);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return(0);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(TrailingStop&gt;0) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if((OrderOpenPrice()-Ask)&gt;(Point*TrailingStop)) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if((OrderStopLoss()&gt;(Ask+Point*TrailingStop)) ||<BR>
(OrderStopLoss()==0)) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>
OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrailingStop,OrderTakeProfit(),0,Red);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return(0);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;&nbsp; }<BR>
}<BR>
<BR>
<BR>
<BR>
</tt>


    







</body></html>



