//+------------------------------------------------------------------+ //+ Trade on 6-period HLCC/4 trend NO T/P, keep adjusting S/L | //+------------------------------------------------------------------+ #property copyright "Ron Thompson" #property link "http://www.lightpatch.com/forex" // User Input extern double Lots = 0.1; extern double Stop_Loss = 15; //+------------------------------------------------------------------+ //| What to do 1st | //+------------------------------------------------------------------+ int init () { return(0); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int start() { double oTYP0=0, oTYP1=0, oTYP2=0, oTYP3=0, oTYP4=0, oTYP5=0; double total; int cnt; bool foundorder=False; double nslB=0,nslS=0,osl=0,ccl=0; // // Error checking // if(Bars<100) { Print("bars less than 100"); return(0); } if(AccountFreeMargin()<(1000*Lots)) { Print("We have no money"); return(0); } // // only one order at a time/per symbol // so see if our symbol has an order open // total=OrdersTotal(); for(cnt=0;cntoTYP4 && oTYP4>oTYP3 && oTYP3>oTYP2 && oTYP2>oTYP1 && oTYP1>oTYP0) { // no take profit so I can scalp if I want Print("SELL Order started ",Bid," ",Bid-(Stop_Loss*Point()) ); OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Bid+(Stop_Loss*Point()),0,"5P Sell",16789,0,Red); if(GetLastError()==0)Comment("SELL Order opened : ",Bid ); } // up trend if(oTYP5