View Single Post
Old 2008-12-10, 05:07 AM   #20 (permalink)
jimsmithuk
Rookie Pip Officer
 
Trader for 0 - 1 year
Location: Ireland
Posts: 27

Default

I know it has a SL. But my point was that it does not set a SL when it first opens the order

If you look at the code. The red zero is where you would/could set a SL for when you initially open the SELL order. Also, the magic number is hardcoded. So I'm thinking I might put these couple of things into variables you can set. Then I'll put the amended code up here.

When you open an order what would you recommend a suitable SL to be?


// check for short position (SELL) possibility
if(SARCurrent>Ask && SARPrevious<Ask)
{
ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,Bid-TakeProfit*Point,"macd sample",16384,0,Red);
if(ticket>0)
jimsmithuk is offline   Reply With Quote