View Single Post
  #7 (permalink)  
Old 01-13-2009, 09:23 AM
okranoblues okranoblues is offline
Junior Member
 
Join Date: Apr 2008
Posts: 9
okranoblues is on a distinguished road
Thumbs up stop loss base on the next low

Can you please put an example of stop loss based on next higher low and next lower highs?

if is uptrend move the stop loss 10 pips below the next lower high for downtrend the opposite.


Thank you




Quote:
Originally Posted by MANSTIR View Post
here some of coding example ;

extern double StopLoss = 0.0;

.....

....

double l_price_12;

..................
..................

if (StopLoss == 0) l_price_12 = 0;
else l_price_12 = NormalizeDouble(Ask - StopLoss * Point, Digits);
if (OrderSend(Symbol(), OP_BUY, LotsOptimized(), Ask, slippage, l_price_12, l_price_4, "M buy", Magic, 0, Blue) > -1) gi_180 = FALSE;
PlaySound("alert.wav");

.......
.......

best of luck,

MANSTIR
Reply With Quote