//+------------------------------------------------------------------+ //+ Trade on 6-period HLCC/4 trend NO T/P, keep adjusting S/L | //+------------------------------------------------------------------+ // need OrderSelect so more than one order can be open at a time #property copyright "Ron Thompson" #property link "http://www.lightpatch.com/forex" // User Input extern double Lots = 0.1; //+------------------------------------------------------------------+ //| 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; // // Error checking // if(Bars<100) { Print("bars less than 100"); return(0); } //if(TakeProfit<10) // { // Print("TakeProfit less than 10"); // return(0); // } if(AccountFreeMargin()<(1000*Lots)) { Print("We have no money"); return(0); } // // only one order at a time/ per symbol // total=OrdersTotal(); for(cnt=0;cntoTYP3 && oTYP3>oTYP2 && oTYP2>oTYP1 && oTYP1>oTYP0) { Print("SELL Order started"); // no take profit. I wanna do it for now so I can scalp if I want OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Bid+0.0010,0,"6P Sell",16789,0,Red); if(GetLastError()==0)Print("SELL Order opened : ",OrderOpenPrice()); } // up trend if(oTYP40) // { // if(Bid-OrderOpenPrice()>Points*TrailingStop) // { // if(OrderStopLoss()