Parabolic SAR indicator - page 6

 

Double parabolic psar

Hi,

I found this nice Ea, it enters a trade at the first psar signal. Then it exits at the reverse signal on a second psar. The only problem is that it enters multiple trades on a single candle if the 2 psars are to close. I tried figuring out how to make it only take one trade per candle or give it some sort of time delay before making another trade, but with no avail. As you can tell, i am no coder. I hope this EA can be of use to someone as well.

Would someone be kind enough to make it only trade once per candle? It would really be appreciated.

I have included a screenshot to show you the problem. And i have also put the EA that i am trying out.

Thank you in advance for your reply and help, any help is greatly apriciated.

cheers,

Ramy

 

Has anyone developed an EA based on this?

 

Double Parabolic SAR EA - One Trade Per Candle

RAMY1:
Hi,

Would someone be kind enough to make it only trade once per candle? It would really be appreciated.

Thank you in advance for your reply and help, any help is greatly appreciated. Cheers,

Ramy

Hi Ramy,

It appears that the EA already has the functions built-in to do only one trade per candle...but I'm not sure if they are working correctly.

Two built-in functions that should limit the trades:

extern bool AddPositions=false; //positions cumulated

extern int MaxOrders=100; //maximum number of orders

I left AddPositions=false and set MaxOrders=1...but it still made many trades per bar.

Being just a novice coder, I did a quick playful test. I added the "AddPositions=false;" function in the following section of code and now it makes only one trade per candle.

---------------------------------------------------

// expert open position value

AddPositions=false; <<----------------I added it here

if((AddP()&&AddPositions&&OP<=MaxOrders)||(OP==0&&!AddPositions)){

if(OS==0&&OB==0){Comment("no order opened");}

----------------------------------------------------

But if "AddPositons=false" is already set in the input settings, it should already be working? So something else may not be right.

Attached is a screen shot of the single trades per candles, so it can be done..

Maybe someone with better coding skills can take a look and see what's happening with the built-in functions that should limit the trades to once per candle.

Hope this helps,

Robert

 

thanks for this ea. how well have you faired with it so far?

 

EA need help ...

Hi all ....

please help with my EA.

Based on "parabolic SAR"

I need help to modify (Add new code) my ea.

Please help me to compile "Time Trade", TP,SL&Trailing Stop.

Thank's All

best regard

Files:
d-brict.mq4  4 kb
 

can you please post that Indicator file here?

cosmiclifeform:
Hi Ramy,

It appears that the EA already has the functions built-in to do only one trade per candle...but I'm not sure if they are working correctly.

Two built-in functions that should limit the trades:

extern bool AddPositions=false; //positions cumulated

extern int MaxOrders=100; //maximum number of orders

I left AddPositions=false and set MaxOrders=1...but it still made many trades per bar.

Being just a novice coder, I did a quick playful test. I added the "AddPositions=false;" function in the following section of code and now it makes only one trade per candle.

---------------------------------------------------

// expert open position value

AddPositions=false; <<----------------I added it here

if((AddP()&&AddPositions&&OP<=MaxOrders)||(OP==0&&!AddPositions)){

if(OS==0&&OB==0){Comment("no order opened");}

----------------------------------------------------

But if "AddPositons=false" is already set in the input settings, it should already be working? So something else may not be right.

Attached is a screen shot of the single trades per candles, so it can be done..

Maybe someone with better coding skills can take a look and see what's happening with the built-in functions that should limit the trades to once per candle.

Hope this helps,

Robert

Hi cosmiclifeform,

Can you please post that Indicator file here?

 

Double Parabolic SAR EA - See Post #53

princesakthi:
Hi cosmiclifeform,

Can you please post that Indicator file here?

Hi Prince,

See Post #53 above for the Double Parabolic SAR EA discussed in this thread.

Good luck and have fun!

Robert

 

The main problem with PSAR is that is lags real bad.

 

Psar

If you want it to be fast, just change the setting then it will get you faster in the trade

 

Parabolic alert that can work on Interbank FX MT4

Hi,

I am new here. I been trying to use the parabolic alert that can work on Interbank FX MT4. I have tried most that recommended here.

Could someone help me on this.

I hope codersguru sees this and could help me.

Plsssss.

Regards

Sarakane

Reason: