stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

The Hidden Pending EA
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3573
Page 49 of 49
Author:  milanese [ Mon Dec 07, 2020 12:23 pm ]
Post subject:  The Hidden Pending EA

neorage30 » Fri Nov 20, 2020 3:49 am wrote:I just want to thank Tomasso and members of SHF for contributing so much useful stuffs and letting you guys know that I will use it, learn from it & edit it to my need.

Although it may sound common and everyone were taught to do it, but my belief require me to ask/let the owner know that I'm using their stuff. So, here I am.
you are very welcome!

Cheers :)

Tommaso
Author:  forexgeeker [ Wed Apr 28, 2021 10:20 am ]
Post subject:  The Hidden Pending EA

Hi guys, I have a question. :smile:
Screenshot_1.png
I'm using this EA for stacking order. From my understanding, the "movePendingBuyDownIfPriceMovesDown" and "movePendingSellUpIfPriceMovesUp" only works if there's not yet first order filled, am i right?

Because i notice that even if i set, "movePendingBuyDownIfPriceMovesDown= true", after the first order has been filled the next buystop order won't move down if the price move down.

Is there any way to make the buystop order to also move down if price goes down even after the first fill?

I'm bad at explaining things, so this is what i'm trying to achieve;
Screenshot_3.png
Author:  lemur6666 [ Wed Apr 28, 2021 2:01 pm ]
Post subject:  The Hidden Pending EA

You got it right,
If you have any order opened than procedure will not reach CreateBuyLine - condition for Count Orders is in line 4 (line 1502 in the code):

Code: Select all

if(movePendingBuyDownIfPriceMovesDown && SetAutoPendingStopBuy)
     {
      if(CountBuysScanning(Symbol(),MagicNumber)==0 && CountSellsScanning(Symbol(),MagicNumber)==0)
        {
         if((PendingPriceBuy-Bid)>DistancePendingToPrice/factor)
           {

            PendingPriceBuy=Bid+(DistancePendingToPrice/factor);
            CreateBuyLine();

           }

        }
     }
Author:  forexgeeker [ Thu Apr 29, 2021 7:52 am ]
Post subject:  The Hidden Pending EA

lemur6666 » Wed Apr 28, 2021 10:01 am wrote:You got it right,
If you have any order opened than procedure will not reach CreateBuyLine - condition for Count Orders is in line 4 (line 1502 in the code):

}[/code]

Hi, thank you for your guide. I tried to 'modify' the code but it just didn't work. :arrrg:

Not really 'modify' to be honest. All i did was just deleting and removing the code. I have no idea what to add in. :mrgreen:

Code: Select all

if(CountBuysScanning(Symbol(),MagicNumber)==0 && CountSellsScanning(Symbol(),MagicNumber)==0)
If i remove this line, after the first order is filled, the next pending order will continuosly trailing the price if it move against and it won't stop trailing until it return back to it's original position.

Code: Select all

if(movePendingBuyDownIfPriceMovesDown && SetAutoPendingStopBuy)
     {
      if(CountBuysScanning(Symbol(),MagicNumber)==0 && CountSellsScanning(Symbol(),MagicNumber)==0)
        {
         if((PendingPriceBuy-Bid)>DistancePendingToPrice/factor)
           {

            PendingPriceBuy=Bid+(DistancePendingToPrice/factor);
            CreateBuyLine();

           }

        }
     }
   if(movePendingSellUpIfPriceMovesUp && SetAutoPendingStopSell)
     {
      if(CountSellsScanning(Symbol(),MagicNumber)==0 && CountBuysScanning(Symbol(),MagicNumber)==0)
        {
         if((Bid-PendingPriceSell)>DistancePendingToPrice/factor)
           {

            PendingPriceSell=Bid-(DistancePendingToPrice/factor);
            CreateSellLine();

           }
Then if i remove this entire command line, the order is still triggered but won't jump like i need it to.

hhmmm...definitely need to add some code. Any idea?
Author:  yangmulia [ Mon Nov 01, 2021 4:01 pm ]
Post subject:  The Hidden Pending EA

hello, is this thread still alive?
Author:  thepcyber [ Wed May 25, 2022 5:20 pm ]
Post subject:  The Hidden Pending EA

Thank you
All times are UTC Page 49 of 49