See article Эксперты на основе популярных торговых систем и алхимия оптимизации торгового робота (Продолжение)
Hello Rosh,
The article looks very interesting, however my russian is not very fluent =) ....... do you know if there's an english version???
As turbo2602, I'm also very interested in testing EA with PSAR.
Thanks and best regards,
Rosh,
Thanks for the link, I managed to get some info from there even though my Russian is zero at this point :)
I have created an EA for what I was looking for but for some reason when I back test it no lots gets opened, what exactly I’m I missing here. All what I wanted the EA to do is that to open positions when Parabolic SAR changes direction “from being above candle to below the candle and visa versa and close the previous open position” don’t care about the time frame for that chart…
Could you please take a look at what I have and let me know if there is anything you could help me with.
Your help is greatly appreciated.
Thanks
//Created by Mike K.\\
//------------------------------------------------------------------\\
extern double step=0.02;
extern double max=0.2;
extern double Lots=2;
extern int StopLoss=10;
extern int TakeProfit=50;
extern int TrailingStop=30;
extern int ranging=50;
extern int trev=4;
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
void start()
{
Print ("EA Started..... waiting for aproval");
Print("EA OK, Started");
}
int totalorder=0;
int cnt, tot, total;
int tiket;
int hournow;
int a,b,c;
int totalreversal=0;
bool sarlatest=true; //true=diatas
bool sarnow=true;
double SL,TP;
if (OrderSymbol()==Symbol() && ( OrderType()==OP_BUY || OrderType()==OP_SELL ))
OrderSelect(SELECT_BY_POS, MODE_TRADES);
if ( ( OrderType()==OP_BUY && ( iSAR(NULL,0,0.02,0.2,0) > High[0])) ||
( OrderType()==OP_SELL && ( iSAR(NULL,0,0.02,0.2,0) < Low[0])) )
Print("Reversal..... closing position");
OrderClose(OrderTicket(),OrderLots(),Bid,Violet);
if (OrderType()==OP_SELL)
OrderModify(OrderTicket(),OrderOpenPrice(),OrderTakeProfit(),0,Orange);
else if (OrderType()==OP_BUY)
OrderModify(OrderTicket(),OrderOpenPrice(),OrderTakeProfit(),0,Orange);
if (iSAR(NULL,0,0.02,0.2,0) > High[0])
if (iSAR(NULL,0,0.02,0.2,0) <= High[0])
if (iSAR(NULL,0,0.02,0.2,0) >= High[0])
if (iSAR(NULL,0,0.02,0.2,0) <= High[0])
if (iSAR(NULL,0,0.02,0.2,0) >= High[0])
Print("Opening a sell position......");
if ( iSAR(NULL,0,0.02,0.2,0) <= Low[0])
return(0);
//+------------------------------------------------------------------+
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello Everyone,
Does anyone has an EA for Parabolic SAR that could share with me, I'm trying to test it with a new starategy that I'm working on.
Thanks,
Mike K.