Trailing Stop MT4

O jezykach programowania w platformach i nie tylko.
maniek16
Bywalec
Bywalec
Posty: 12
Rejestracja: 28 mar 2012, 20:13

Trailing Stop MT4

Nieprzeczytany post autor: maniek16 »

Witam! Mam robota jednak mam problemy w wstawieniem trailing stop'a.
Konto na MT4 Trailing Stop minimum 15 punktów.

Robocik:
//+------------------------------------------------------------------+
//| MA.mq4 |
//| Copyright 2012, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "MA"
#property link "http://www.maniek.pl"//

//--- input parameters

extern int StopLoss=20;
extern int TakeProfit=40;
extern double Lots =0.01;
extern double DecreaseFactor=0;
extern double MovingPeriod=55;
extern double MovingShift=0;

int Krótka=0;

int start()
{

{

double ma0=iMA(NULL,0,MovingPeriod,MovingShift,MODE_SMA,PRICE_CLOSE,1);
double ma1=iMA(NULL,0,MovingPeriod,MovingShift,MODE_SMA,PRICE_CLOSE,2);

if(ma0<ma1 && OrdersTotal()<1)

{
OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Bid+StopLoss*Point,Ask-TakeProfit*Point,"My order SELL",16384,0,Green);
}

}

return(0);
}
Kilka moich spostrzeżeń na temat Forex http://forex-u-mariana.blogspot.com/

bialy
Stały bywalec
Stały bywalec
Posty: 54
Rejestracja: 16 maja 2011, 20:41

Re: Trailing Stop MT4

Nieprzeczytany post autor: bialy »

http://www.forex-tsd.com/expert-advisor ... ic-ea.html
Od tego automatu zaczalem nauke mql. Z tego co pamietam jest tam trailing stop.
oszczedzajmy cykle procesora

maniek16
Bywalec
Bywalec
Posty: 12
Rejestracja: 28 mar 2012, 20:13

Re: Trailing Stop MT4

Nieprzeczytany post autor: maniek16 »

Dzieki:)
Kilka moich spostrzeżeń na temat Forex http://forex-u-mariana.blogspot.com/

ODPOWIEDZ