The Hidden Pending EA

MPTM's new home
Post Reply
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

[updated EA!]TheHiddenPendingEA

Post by milanese »

Feb. 12, 2015
New version fixes a problem in cases order could not be filled by broker, the EA will now handle this event correct and retry to fill the order, thanks to jauhar spotting this problem! :clap:
You find as always the EA attached to the first post
As always ask, if you have problems to understand all functions..

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
jauhar
Trader
Posts: 24
Joined: Wed Apr 17, 2013 6:08 pm

TheHiddenPendingEA

Post by jauhar »

Hi Tommaso,

Thanks for your time. I noticed one thing for MaxSpreadAllowedMultiplicator. It accepts only integer value like 1, 2; but does not accept fractional value like 1.5

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

[upadte!]TheHiddenPendingEA

Post by milanese »

jauhar » Thu Feb 12, 2015 12:18 pm wrote:Hi Tommaso,

Thanks for your time. I noticed one thing for MaxSpreadAllowedMultiplicator. It accepts only integer value like 1, 2; but does not accept fractional value like 1.5

Cheers,
Jauhar
update in first post (version 152), MaxSpreadAllowedMultiplicator is now a double you can use know values like 1.25 ecc, making the spread handling again more flexible..

Thanks again for your spot!

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
jauhar
Trader
Posts: 24
Joined: Wed Apr 17, 2013 6:08 pm

TheHiddenPendingEA

Post by jauhar »

Thank you Tommasu, for the fast update.

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

[update!!]TheHiddenPendingEA

Post by milanese »

Feb. 14,2015
Some fixes, for error cases, to handle this very rare cases correct, some cosmetic updates making the UserInfo more informativ. You will find the update attached on the first post.
As always if you have any questions, doubts how to use the EA, the inputs ecc, post here your question, idea ecc..

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
Over60
Trader
Posts: 153
Joined: Thu Sep 13, 2012 12:58 pm

TheHiddenPendingEA

Post by Over60 »

Hi Milanese,

I need your support.

In the attached pic, the orderlines (pendings) are very close to already open orders, see e.g. the buys. There are buys and sells open created before by defined stacking. The new dynamic initial moving pending feature was set = false.
You can see, that all open orders have the same magicnumber.
For stacking I used 10 pips, so I did expect, that the orderlines (green and red) should placed above (buy) or below (sell) by the defined distance with 10 pips to the latest open orders, be it buy or sell.

Btw: The new dynamic initial moving pending feature should only work, as long as there are no open orders, to avoid stacking multiple opens, but I did not yet test it.

As there are already working orders (with identical magicnumbers), the min distance to price and the dynamic moving pending has to be no longer valid in reference to the current price.
The EA should recognize and consider the distance to the latest open orders, not to the actual price.
So it seems to me by intermediate price movements up and down, further stacking was executed, not considering the a.m. conditions.
Anyway, this feature did already work before the latest updates, so I´m wondering?

In addition: If I close manually all open orders, the HP did not check (by check seconds) to recognize the actual status and to start again by re-initializing with the origin defaults (e.g. stacking in both directions), considering the actual price by min distance to price. Only the latest opposite pending remains active in the chart, if I remove all open orders (might be the same by SL- or TP-executions with the APTM).
If I restart the EA manually, the pendings are correct placed by default.

Maybe, I might be wrong by mistaken settings.

Thanks in advance.
Will stay tuned …

With kind regards
Over60
You do not have the required permissions to view the files attached to this post.
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

TheHiddenPendingEA

Post by milanese »

@Over60 thanks for your post.
You did indeed some missinterpretation, the EA recognizes the distance to the last open orders, but you set for stacking 10 pips so it is clear the EA places 10 pis to the last opened order, or if that will be impossible the next possible distance, note if you have already open positions with the magic-number the HiddenpendigEA uses, all next orders will automatic be stackorders, so the EA will use the stackdistance to place them.
If you close manual all trades the EA does a reinitialize with your start settings, this is previsted in this way. Maybe this part can be coded in an other way that the EA will not do this after you closed positions..I will think about this..

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!!]TheHiddenPendingEA

Post by milanese »

Feb. 18,2015
NewVersion, like Over60 asked the HPEA has now a new input RemoveEAAfterClosingLastEAPos if you set this to true (it is OOTB true) the EA will remove itself from the chart after the last open trade with magicNumber the EA uses is closed, avoiding with some settings"endless trading".
The build 154 is attached to the first post.
As always ask, if you have problems to understand all functions..

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
Over60
Trader
Posts: 153
Joined: Thu Sep 13, 2012 12:58 pm

TheHiddenPendingEA

Post by Over60 »

Hi followers,

I will not keep back, what was communicate in the meantime by PM to avoid misunderstandings.
-----------------------------------
I´m still not clear concerning the restart-functionality with the HP. Sometimes it seems to work, sometimes not. I will stay tuned, to get a screenshot, if it occurs again.
If it works automatically to reinitialize after close of all open orders, there is no need for changes.
If I close the open orders in the chart of the APTM, it should not influence the HP-operation, because the appropriate magic-numbers should remove completely from the terminal.

The other issue seems to me more important for security reasons, especially in choppy markets, because when price moves up and down, not considering already entered orders at the top or bottom of a stacked order grid already entered, the HP will stack orders between the open orders endless, again and again.
Maybe an option will solve this problem.

In previous versions, I assume, that was not the case, because when e.g. a buy-pending was entered, the next pending was placed and it did remain in their latest position, without further movement.

The only case I know, where it makes sense to stack again in any order-direction, when the distance in the already stacked-order grid might be < the stacking distance to the latest resp. nearest stacked order.
Let me call it “scaling in”. This is the case, when I´m convinced the market will move in a designated direction, but it retrace out of the already stacked grid.

Second post

I´m not a coder, but I could imagine, that the HP can supervise, if there are open orders by the magic-number or not. If there is no magicnumber created by the HP, the HP can re- initialize automatically, as long no pending after attaching the HP has opened. This might occur, if e.g. the attached APTM close automatically all open orders or by manual Close (e.g. after times of absence).
It seems to me a question of coding and logic, if it is necessary to remove the HP by restart resp. manual re-start?

Will stay tuned, what other users mean?

The APTM I assume have such a control-function, to supervise X-seconds, if there are any prize-changes to adapt the parameters.

The other issue is not easy to explain and handle resp. to code, because the EA has to supervise and compare the entered order-prices with the current price, be it buys or sells by some conditions, to avoid endless and uncontrolled multiple stacking.

In order-direction:

If the current price is above the highest and latest stacked order-price, stack pending-order considering distance in price direction as usual. (The last pending remains in the latest position)

If the price by retracement is below the lowest (first) stacked order-price and considering distance, stack order by a true/false-option (because of scaling in).

The problem by coding seems to me, that the order-distances have to be considered too, to avoid endless stacking out of control.

Btw: A lot of users do not trade with multiple orders, so my imaginations might not match with other user’s requirements.
-------------------------------------------------

Hope my thoughts are comprehensive and makes sense.

Milanese did reply:

it does it in the latest version.. and please post always your toughts and questions, as it is a help for many users having similar questions.

Hope that helps for further clarifications and the use of the HP with it advanced functions.


Thanks to Milanese … for your support and patience

Moving on …
Over60
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

TheHiddenPendingEA

Post by milanese »

@Over60
Endless stacking will be avoided with the new setting RemoveEAAfterClosingLastEAPos and the input MaxOpenPositions. This EA is very complex, but can near all trading styles, that ask for pending orders, support. So far we have only one stacking distance possible, but if calculated with ATR the stacking distance will be dynamic and always in touch with the actual dynamic of the traded pair. I recommend all to test different set ups on demo as it is always best to learn how an EA works by doing. Right used the HPEA is a very strong trading toy.

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
Post Reply

Return to “Utilities Indicators and Scripts”