Just as easy as described in workshop 6:

Code:
function tradeOneNightStand() {
	
vars Price = series(price());
vars SMA10 = series(SMA(Price, 10));
vars SMA40 = series(SMA(Price, 40));

//Stop = 90 * PIP;

var BuyStop,SellStop;

BuyStop = HH(10) + 1*PIP;
SellStop = LL(10) - 1*PIP;

if (dow() == 5 && NumOpenLong == 0 && NumPendingLong == 0 && SMA10[0] > SMA40[0]) 
	enterLong(0,BuyStop);
else if (dow() == 5 && NumOpenShort == 0 && NumPendingShort == 0 && SMA10[0] < SMA40[0])
	enterShort(0,SellStop);			

if (dow() != 5 && dow() != 6 && dow() != 7) {
	exitLong();
	exitShort();
}
	
}


function run() {

BarPeriod = 1440;

while(asset(loop("USD/CHF", "USD/JPY" , "GBP/USD", "EUR/USD")))
	tradeOneNightStand();

}



produces result:

Code:
Portfolio analysis  OptF  ProF  Win/Loss  Wgt%

EUR/USD avg         .501  2.59   44/21    57.7  
GBP/USD avg         .289  1.42   31/26    15.9  
USD/CHF avg         .499  1.28   31/30    12.1  
USD/JPY avg         .466  1.50   32/30    14.2  

EUR/USD             .479  2.59   44/21    57.7  
EUR/USD:L           .278  1.65   14/10    12.7  
EUR/USD:S           .724  3.68   30/11    45.1  
GBP/USD             .297  1.42   31/26    15.9  
GBP/USD:L           .000  0.72   13/16    -6.7  
GBP/USD:S           .578  2.59   18/10    22.6  
USD/CHF             .932  1.28   31/30    12.1  
USD/CHF:L           .999  1.77   17/13    12.8  
USD/CHF:S           .000  0.97   14/17    -0.8  
USD/JPY             .314  1.50   32/30    14.2  
USD/JPY:L           .932  3.32   22/15    26.4  
USD/JPY:S           .000  0.29   10/15   -12.1



Like already mentioned: it's a very basic version ... and in our days I definitely won't advise to keep positions open over the weekend without setting a stop!