Keep us informed of your progress.
My code is like this:
sar1 = sar2; //these variables are statics
sar2 = iSAR(NULL, 0, 0.02, 0.2, 0);
if(sar1<Open[1] && sar2>Open[0]) //if the value of the previous SAR
dot is lower than the open price of the previous bar AND the value of the current
SAR dot is higher than the open price of the current bar
{
OrderSend("EURUSD", OP_SELL, 1, Bid, 3, Bid+30*Point, Bid-10*Point, 0,
Red); //sell
}
if(sar1>Open[1] && sar2<Open[0]) //if the value of the previous SAR
dot is higher than the open price of the previous bar AND the value of the current
SAR dot is lower than the open price of the current bar
{
OrderSend("EURUSD", OP_BUY, 1, Ask, 3, Ask-30*Point, Ask+10*Point, 0,
Blue); //buy
}
the problem is that the EA do the buy/sell operation in the second SAR dot.
Hey man i did it!
The problem wasnt the code, it was the strategy tester. I was working with the open price in the source and in the model of the strategy tester.
In demo account, it works great!
Why don't you upload it and share it with the world
:)
Hello juan
can you tell us if it is good strategy, did it work for you?
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, i need to make a code with the Parabolic SAR function (iSAR). This code have to make an action when the dots of the Parabolic change of direction.
Something like this:
//----
if Parabolic dot change direction
do something like buy or sell
//----
Thanks!
Bye!