|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
need quick help
i have these codes below.....
can somebody please check to see if they follow this rule... If no trades on the chart then with signal it opens 1 lot. if 1 trade already on the chart all the rest of the orders are double lot.. please verify, total = OrdersTotal(); if(total>=2) { if(MA11>MA21 && MA12<MA22) { ticket=OrderSend(Symbol(),OP_BUY,2*Lots,Ask,5,Ask-stoploss*Point,0,0,Magic_number,0,Green); return (0); } if(MA11<MA21 && MA12>MA22) { ticket=OrderSend(Symbol(),OP_SELL,2*Lots,Bid,5,Bid +stoploss*Point,0,0,Magic_number,0,Red); return (0); } } if(MA11>MA21 && MA12<MA22) { ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,5,Ask-stoploss*Point,0,0,Magic_number,0,Green); } if(MA11<MA21 && MA12>MA22) { ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,5,Bid+s toploss*Point,0,0,Magic_number,0,Red); } } |
|
|||
|
i just change and added.. the red characters.. hope that helps..
Quote:
|
|
|||
|
Try this..
Put Code:
double ma_cross; 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;
__________________
Still learning.. Last edited by Devil2000 : 11-30-2007 at 07:12 AM. |
|
|||
|
Can anyone help me with setting up EA that closes all open orders and cancels all pending order at a certain time, i.e., 5:15 a.m. UTC+1 ?
Is it also possible to specify not only the time but the date? |
|
|||
|
Quote:
you can try this.. Quote:
Last edited by antone : 12-05-2007 at 04:15 AM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to code this? | iscuba11 | Metatrader 4 mql 4 - Development course | 1 | 08-03-2007 04:22 PM |