Thread: How to code?
View Single Post
  #522 (permalink)  
Old 11-30-2007, 07:08 AM
Devil2000 Devil2000 is offline
Senior Member
 
Join Date: Dec 2005
Location: In front of my trading desk
Posts: 346
Devil2000 is on a distinguished road
Try this..

Put
Code:
double ma_cross;
as a global variable.

In the start function :

Code:
double ma1=NormalizeDouble(first_ma,Digits);
double ma2=NormalizeDouble(second_ma,Digits);

if(ma1=ma2)
 {
    ma_cross=ma1;
 }

int spread=MarketInfo(Symbol(), MODE_SPREAD);

SLbuy=ma1+spread-SL*Point;
SLsell=ma1+SL*Point;
Hope this helps
__________________
Need a professional MQL4 programmer? PM me

Last edited by Devil2000; 11-30-2007 at 07:12 AM.
Reply With Quote