I am working on a better code visualyzing for mql code here this is now in an early alpha state but if you use the code tag with code=mql (just use the quote here, if you don't get it, to see how) the mql code is better readable..
Exp.:
Code: Select all
if(OrderType() == OP_BUY) //we have a buy order
{
ticket=OrderTicket();
{
NewSL=NormalizeDouble(ExtMapBuffer6[1]-(HA_SLMovingDistance*Point), Digits);
if((Bid-NewSL)>(HA_SLMovingDistance*Point))
if((Bid-NewSL)>(SetBEminPip*Point))
{
if((NormalizeDouble(OrderStopLoss(), Digits) != NormalizeDouble(NewSL, Digits)))
if( ((NewSL>OrderStopLoss())||(OrderStopLoss()<(1*Point))) && (NewSL!=0) && (NewSL < Bid - (10*multiplier*Point)) )
{
Alert("SetBEAndJump :Attempting to move SL of ",symbol," to ",NewSL);
Print("SetBEAndJump :Attempting to move SL of ",symbol," to ",NewSL);
ModifyOrder(ticket,NewSL,0);
}
}
}
Tommaso