The Hidden Pending EA

MPTM's new home
Post Reply
kakashi
Trader
Posts: 10
Joined: Thu Jan 14, 2016 6:04 am

The Hidden Pending EA

Post by kakashi »

Hi Milanese,

I notice in some cases like during high volatility or wide spread,the EA can't execute the pending order.
Would it be possible for us to receive an alert for this? I mean something that will say "Failed to open order for EURUSD at 1.xxxxx", and then this notification will be shown on the pop alert and sent via push/email.

From my reading,I understand that the EA have the ability to handle this kind of case where it will re-position back the PO.But my trading strategy(hedging and stacking) requires me to have the order opened at the determined place in order to maintain its balance.So,if I can receive this type of alert,I can launch my vps and open the order manually.

Thank you in advance :hi:

cheers,
kakashi
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

The Hidden Pending EA

Post by milanese »

kakashi » Thu Jan 21, 2016 10:12 am wrote:Hi Milanese,

I notice in some cases like during high volatility or wide spread,the EA can't execute the pending order.
Would it be possible for us to receive an alert for this? I mean something that will say "Failed to open order for EURUSD at 1.xxxxx", and then this notification will be shown on the pop alert and sent via push/email.

From my reading,I understand that the EA have the ability to handle this kind of case where it will re-position back the PO.But my trading strategy(hedging and stacking) requires me to have the order opened at the determined place in order to maintain its balance.So,if I can receive this type of alert,I can launch my vps and open the order manually.

Thank you in advance :hi:

cheers,
kakashi
You can set a higher value MaxSpreadAllowedMultiplicator this will make the spread filter less restritive, but I will think about an alert, if an order will be refused because of to high spread.

Cheers :)

Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

[update!!]The Hidden Pending EA

Post by milanese »

jan 21,2016 v1.96
update: alerting, if wished, if a trade was not filled because of too high spread...
the new setting is:
AlertIfTradeNotFilled=true setting this to false will disable these alerts
Too some minor changes for easier inputs..

Go to the first post to download the new version and please if you are new here read the first post with much attention.

Cheers :)


Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
kakashi
Trader
Posts: 10
Joined: Thu Jan 14, 2016 6:04 am

The Hidden Pending EA

Post by kakashi »

milanese » Thu Jan 21, 2016 10:17 am wrote: You can set a higher value MaxSpreadAllowedMultiplicator this will make the spread filter less restritive, but I will think about an alert, if an order will be refused because of to high spread.

Cheers :)

Tommaso
I have setting the (MaxSpreadAllowedMultiplicator =2.2),(Slippage =8),and (MaxDifferentPrice =8),but still in some case the order not opened.This is I think due to my broker feed not so reliable,and the spread is also quite big.

cheers,
kakashi
kakashi
Trader
Posts: 10
Joined: Thu Jan 14, 2016 6:04 am

[update!!]The Hidden Pending EA

Post by kakashi »

milanese » Thu Jan 21, 2016 10:55 am wrote:jan 21,2016 v1.96
update: alerting, if wished, if a trade was not filled because of too high spread...
the new setting is:
AlertIfTradeNotFilled=true setting this to false will disable these alerts
Too some minor changes for easier inputs..

Go to the first post to download the new version and please if you are new here read the first post with much attention.

Cheers :)

Tommaso
Wow,that was so fast.!!!Thank you very very much.. :good:

cheers, :yahoo:
kakashi
kakashi
Trader
Posts: 10
Joined: Thu Jan 14, 2016 6:04 am

The Hidden Pending EA

Post by kakashi »

Hi all,I use this script as a backup(to open order manually) incase if the pending order is not filled due to wide spread/volatile market.It has the magic number so eventhough the order is manually opened,the HPEA will still recognize the order and manage it accordingly.
It is very easy to use,if you drop it on the chart higher than the current price it will open buy order.If you drop it lower than current price it will open sell order.The original script is from here http://www.stevehopwoodforex.com/phpBB3 ... 35#p127838

I'm not a coder,I'm just a breast feeding baby who like to try modify things.. :lol:
and suprisingly it works.So,I just share it here incase anyone need it.
You do not have the required permissions to view the files attached to this post.
drunka
Trader
Posts: 86
Joined: Thu Dec 11, 2014 8:05 pm

The Hidden Pending EA

Post by drunka »

Hallo Tommaso,

thank you for your excellent EA! :)

One question, I am using the useCandleHighLowForInitial function.
On the pending buy orders I would like to add the average spread. I am able to add the spread while initiating the EA via

Code: Select all

 double spread2=(MarketInfo(Symbol(),MODE_SPREAD)/10);    
         PendingPriceBuy=NormalizeDouble((iHigh(Symbol(),TimeFrameForCandleHL,1)+((CandleHighLowBuffer+spread2)/factor)),Digits);
but I have no clue how to get the average spread into the PendingPriceBuy (only got very rudimentary coding skills so I am juggling with the code parts).

Maybe you you would be able to help me out a bit?

Cheers
drunka
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

The Hidden Pending EA

Post by milanese »

drunka » Mon Feb 08, 2016 3:15 pm wrote:Hallo Tommaso,

thank you for your excellent EA! :)

One question, I am using the useCandleHighLowForInitial function.
On the pending buy orders I would like to add the average spread. I am able to add the spread while initiating the EA via

Code: Select all

 double spread2=(MarketInfo(Symbol(),MODE_SPREAD)/10);    
         PendingPriceBuy=NormalizeDouble((iHigh(Symbol(),TimeFrameForCandleHL,1)+((CandleHighLowBuffer+spread2)/factor)),Digits);
but I have no clue how to get the average spread into the PendingPriceBuy (only got very rudimentary coding skills so I am juggling with the code parts).

Maybe you you would be able to help me out a bit?

Cheers
drunka
The EA does for itself caclculate the average spread, as this is used for the spread filter, too the EA fills BUYS only if the bid is higher than the hidden pending price and uses the ask for SELLS so the spread is already integrated...(indirect but it is a well runnning system)

Cheers :)

Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
drunka
Trader
Posts: 86
Joined: Thu Dec 11, 2014 8:05 pm

The Hidden Pending EA

Post by drunka »

milanese » Today, 17:17 wrote: The EA does for itself caclculate the average spread, as this is used for the spread filter, too the EA fills BUYS only if the bid is higher than the hidden pending price and uses the ask for SELLS so the spread is already integrated...(indirect but it is a well runnning system)

Cheers :)

Tommaso

:yahoo:
I assume I was seeing pink elephants before %-]
Thank you for your fast reply and helpful explanation!
kakashi
Trader
Posts: 10
Joined: Thu Jan 14, 2016 6:04 am

The Hidden Pending EA

Post by kakashi »

Hi Tommaso,

I need some help as I not quite understand how the (AvoidInRetracingDoubleOrders) works.

In the first post you have mention "if AvoidInRetracingDoubleOrders=true the HPEA will , if you had allowed trades in both directions, or only in one, avoid to enter in price retracing phases at simil levels the EA has already trades open."

But although I have set it to true,I still get few order opened at the same level.This happen when price move back and forward couple times(ranging) which cause the pending order to re-adjust itself back to the level where there's already an order opened.

How can I avoid duplicate order opened at the same level?
I attach my set file for reference.

Thank you.
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “Utilities Indicators and Scripts”