Moving Day

Post Reply
User avatar
woodlands
Trader
Posts: 226
Joined: Sun Mar 23, 2014 6:16 pm

Moving Day

Post by woodlands »

And the v small live one, trying too hard and not letting MD run itself..... :oops:
2020-05-09_100MD_2grid.png
You do not have the required permissions to view the files attached to this post.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Moving Day

Post by SteveHopwood »

woodlands » Sat May 09, 2020 5:42 am wrote:And the v small live one, trying too hard and not letting MD run itself..... :oops:
We both know how different it is trading live verses trading demo, however small the live cash account is. :lol: Interfere at will. Why not?

What is so exciting about your, mine and all the other results posted/available here is the percentage gain in such a short time. I posted my live results earlier in the week. I shall update the demo I feature at the end of post 2 later; it has more than doubled and this week has been fantastic.

Happy times.

:xm: :rocket:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Moving Day

Post by SteveHopwood »

V 1k is in post 1. I found the reason MD was not deleting stop orders following a recross as soon as I looked for it. The relevant function was only coded to close the order types sent to it as a parameter, so it would close market trades but ignore stop orders. This should be fixed now.

DIYers, the easiest way is to go to these two functions:
void closeAllTrades(string symbol, int type)
void closeAllTradesFIFO(string symbol, int type) - directly underneath.

and replace the existing functions with these:

Code: Select all

void closeAllTrades(string symbol, int type)
{
   forceTradeClosure= false;
  
   
   if (OrdersTotal() == 0) return;
   
   //For US traders
   if (MustObeyFIFO)
   {
      closeAllTradesFIFO(symbol, type);
      return;
   }//if (MustObeyFIFO)
      

   bool result = false;
   for (int pass = 0; pass <= 1; pass++)
   {
      
      for (int cc = ArraySize(fifoTicket) - 1; cc >= 0; cc--)
      {
         if (!betterOrderSelect(fifoTicket[cc], SELECT_BY_TICKET, MODE_TRADES) ) continue;
         if (OrderMagicNumber() != MagicNumber) continue;
         if (OrderSymbol() != symbol) 
            if (symbol != AllSymbols)
               continue;
         if (type != AllTrades)
         {
            if (type == OP_BUY)
               if (OrderType() == OP_SELL || OrderType() == OP_SELLLIMIT || OrderType() == OP_SELLSTOP)
                  continue;
            
            if (type == OP_SELL)
               if (OrderType() == OP_BUY || OrderType() == OP_BUYLIMIT || OrderType() == OP_BUYSTOP)
                  continue;
         
         }//if (type != AllTrades)
         
         
         //if (OrderType() != type) 
         //   if (type != AllTrades)
         //      continue;
         
         while(IsTradeContextBusy()) Sleep(100);
         if (OrderType() < 2)
         {
            result = OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), 1000, CLR_NONE);
            if (result) 
            {
               cc++;
               openTrades--;
            }//(result) 
            
            if (!result) forceTradeClosure= true;
         }//if (OrderType() < 2)
         
         if (pass == 1)
            if (deletePendings)
               if (OrderType() > 1) 
               {
                  result = OrderDelete(OrderTicket(), clrNONE);
                  if (result) 
                  {
                     cc++;
                     openTrades--;
                  }//(result) 
                  if (!result) forceTradeClosure= true;
               }//if (OrderType() > 1) 
               
      }//for (int cc = ArraySize(fifoTicket) - 1; cc >= 0; cc--)
   }//for (int pass = 0; pass <= 1; pass++)
   
  
}//End void closeAllTrades(string symbol, int type)

void closeAllTradesFIFO(string symbol, int type)
{
   forceTradeClosure= false;
   
   if (OrdersTotal() == 0) return;

   bool result = false;
   for (int cc = ArraySize(fifoTicket) - 1; cc >= 0; cc--)
   {
      if (!betterOrderSelect(fifoTicket[cc], SELECT_BY_TICKET, MODE_TRADES) ) continue;
      if (OrderMagicNumber() != MagicNumber) continue;
      if (OrderSymbol() != symbol) 
         if (symbol != AllSymbols)
            continue;
      if (type != AllTrades)
      {
            if (type == OP_BUY)
               if (OrderType() == OP_SELL || OrderType() == OP_SELLLIMIT || OrderType() == OP_SELLSTOP)
                  continue;
            
            if (type == OP_SELL)
               if (OrderType() == OP_BUY || OrderType() == OP_BUYLIMIT || OrderType() == OP_BUYSTOP)
                  continue;
      
      }//if (type != AllTrades)
         
      
      //if (OrderType() != type) 
         //if (type != AllTrades)
           // continue;
      
      while(IsTradeContextBusy()) Sleep(100);
      if (OrderType() < 2)
      {
         result = OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), 1000, CLR_NONE);
         if (result) 
         {
            cc++;
         }//(result) 
         
         if (!result) forceTradeClosure= true;
      }//if (OrderType() < 2)
      
      if (OrderType() > 1) 
      {
         result = OrderDelete(OrderTicket(), clrNONE);
         if (result) 
         {
            cc++;
         }//(result) 
         if (!result) forceTradeClosure= true;
      }//if (OrderType() > 1) 
      
   }//for (int cc = ArraySize(fifoTicket) - 1; cc >= 0; cc--)


}//End void closeAllTradesFIFO(string symbol, int type)
:xm: :rocket:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Moving Day

Post by SteveHopwood »

Last week was stunning:
last week.png
And since opening the demon on April 9th:
all history.png
Wow.

:xm: :rocket:
You do not have the required permissions to view the files attached to this post.
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
rapple
Trader
Posts: 277
Joined: Fri Feb 21, 2014 10:56 pm
Location: Sydney, Australia

Moving Day

Post by rapple »

:good:

That is very impressive results Steve

I too am on the Moving Day band wagon and doing well

Thank you for sharing :clap: :clap: :clap:
luipogifx
Trader
Posts: 17
Joined: Sat Dec 01, 2018 5:30 am

Moving Day

Post by luipogifx »

It's a Moving Day everyone!!!!

:cheer: :cheer: :cheer:
hamburglar
Trader
Posts: 27
Joined: Sun Nov 27, 2011 8:08 pm

Moving Day

Post by hamburglar »

Thank you for Moving day Steve.

Currently i have Moving day monitoring 21 pairs. Margin gets to be very low when today 6 pairs started trading and the grid starts to fill. Right now on a $6000 demo i am at 350% margin. As per the manual i have the lots set at .25. Is there a way we could have the bot limit the number of pairs allowed to trade at one time? It would make it easier to calculate risk.

As well when the GridSize is set to 5 it is sending 6 trades. I noticed this on your demo from the manual too.

Current floating open trades are $126 positive as i write this.

Moving more towards set and for get. Wonderful piece of inginuity.

thank you again.

Jim
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Moving Day

Post by SteveHopwood »

hamburglar » Mon May 11, 2020 5:11 pm wrote:Thank you for Moving day Steve.

Currently i have Moving day monitoring 21 pairs. Margin gets to be very low when today 6 pairs started trading and the grid starts to fill. Right now on a $6000 demo i am at 350% margin. As per the manual i have the lots set at .25. Is there a way we could have the bot limit the number of pairs allowed to trade at one time? It would make it easier to calculate risk.
I will add this.
As well when the GridSize is set to 5 it is sending 6 trades. I noticed this on your demo from the manual too.

Current floating open trades are $126 positive as i write this.

Moving more towards set and for get. Wonderful piece of inginuity.

thank you again.

Jim
MD sends the trigger trade and then a further grid of 5 stop orders by default. I have added a note to this to the user guide that I will upload when I have added the pairs trading limit code.

MD is not the same as the bot I started with. FYI, read the whole thread to see how members' suggestions have turned it into the monster it has become.

:xm: :rocket:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Moving Day

Post by SteveHopwood »

luipogifx » Mon May 11, 2020 12:45 pm wrote:It's a Moving Day everyone!!!!

:cheer: :cheer: :cheer:
Yep.I started the week with a $400 global basket closure on my main trading account, $40 on a couple of smaller ones and $4,000 on the demo.

Happy start to the trading week. :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap:

:xm: :rocket:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
Fourxxxx

Moving Day

Post by Fourxxxx »

Just set up Moving Day (apparently it is a thing in Quebec Canada 1st July every year) looking forward to seeing some wonderful results. I found this thread searching for code snippets for an EA (very rough and basic) I have been working on that is similar.

BTW I had to dig around to find the DrawClosedTrades and DrawOpenTrades indicators, they are here if anyone is looking.
viewtopic.php?p=155669#p155669
Post Reply

Return to “Moving Day”