| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Moving Day https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5801 |
Page 2 of 18 |
| Author: | SteveHopwood [ Sun Mar 15, 2020 2:48 pm ] |
| Post subject: | Moving Day |
V 1b is in post 1, with a teensy update to the chart information display. I set up four demo accounts this morning and realised how helpful it would be to have the trading method displayed along with the number of pips away from the market the stop orders would be placed. 1b displays this information. Easy DIY. D a search for: sizingInfo = sizingInfo + " Single trading method is enabled. "; Replace the entire block of code with: Code: Select all |
|
| Author: | SteveHopwood [ Sun Mar 15, 2020 2:49 pm ] |
| Post subject: | Moving Day |
I have created four new demo accounts that you can follow. Details in post 2. |
|
| Author: | SteveHopwood [ Sun Mar 15, 2020 7:34 pm ] |
| Post subject: | Moving Day |
I got 1b's upload wrong earlier - or forgot to upload it. Try again, folks. |
|
| Author: | SteveHopwood [ Sun Mar 29, 2020 2:32 pm ] |
| Post subject: | Moving Day |
MD took a bath last week. Newcomers will be wondering what the fuss is about. I received this in an email from youcrazykids: All this is in 1d - post 1 as usual. Scaling out is in the trade exits inputs and works as in Desky and SPCB. There is a new input for grid trading: PendingDistanceToFirstTradePips. This is for when the first trade is a stop order and tells MD how far away from market to set the fill price. Assuming the initial trade has a take profit set, the the additional stop orders will have the same tp. All trades in the position will close at the same time. I am going to set this up on the three demos I list in post 2. PendingDistanceToFirstTradePips will be set to 10, 15, 20 respectively. I have added a set file to post 1 to help you set up quickly and easily - "MD scale out and grid.set". This starts the grid 20 pips away from the market price, then sends four more grid trades 20 pips apart. The take profit is 100 pips and the dire emergency stop loss is 300 pips. You can experiment with a far distant take profit, grid size, rolling grid etc. It is all in the user guide but you do not need this if you are already familiar with these functions. Don't try to DIY unless you are very confident. Adding code like this causes me to examine existing code and I could not see how the hidden stop loss and take profit code could work properly so I made a lot of changes there, including adding Global Variables to store the hidden stops. I also spotted a couple of horrendous bloops in the sell grid order sending; I had an immediate market order set to send a buy trade instead of a sell - one of my infamous copy/paste/forgot-to-edit bloops. There could be bugs, so sing out if you notice anything strange. |
|
| Author: | SteveHopwood [ Tue Mar 31, 2020 2:07 pm ] |
| Post subject: | Moving Day |
That youcrazykids' inspired idea of sending a grid of pending orders makes a huge difference became apparent today. 1e is in post 1. MD should have sent 5 pending orders: the initial trigger order then the grid of 4. He appears to have only sent 3 in total. I am not sure if the fix in 1e will sort this out entirely. We shall see. To apply your own fix, go to the end of: void lookForTradingOpportunities(string symbol, int pairIndex) Scroll up about 12 lines to the code block that sends the buy and sell grids. Replace the entire block with this: Code: Select all The scale out stop loss code is working to an extent, but not as I intend. I shall look into that. I remind you folks that Thomas has uploaded new versions of TDesk and assorted stuff. Current versions will expire tomorrow. |
|
| Author: | SteveHopwood [ Tue Mar 31, 2020 3:25 pm ] |
| Post subject: | Moving Day |
MD is sending 4 orders now - still short by 1. I have attempted a fix and will post it when I have redone the scaling out thingy. For now, those of you who can, do a search for: if(doesTradeExist(symbol,type,price)) Insert this just above the 'continue;' command: cc--; Repeat the search and insertion as this code needs to go into two functions. |
|
| Author: | SteveHopwood [ Wed Apr 01, 2020 7:47 pm ] |
| Post subject: | Moving Day |
Just to let you know folks, that I have spent much of today battling with scale out stop loss code for Moving Day. It occurred to me that it would be possible to accommodate account based lot sizing using Global Variables to store the lot size of the trigger trade. The details are proving to be a bit of a bugger. More as soon as I have frightened the problems into running away. |
|
| Author: | SteveHopwood [ Thu Apr 02, 2020 7:17 pm ] |
| Post subject: | Moving Day |
Everyone likes a laugh at my expense. bobier sent me a fix a few minutes ago, for a chart display thingy when the broker has a pair prefix/suffix. I was not aware of the problem as my broker is Global Prime and they do not fart around with such nonsense. Here is my reply: Scaling back in is coming. In the meantime, the attached should work properly it terms of scaling out. Don't bother trying to DIY; life is too short. Scaling out is now independent of the stop loss. NoOfLevels tells MD how many times to apply scaling out. DistanceBetweenLevelsPips is how many pips are between scale out levels. PercentToClose is the percentage of the order to close - 25% by default. EDIT: The scaling out is still not quite correct. The bot is closing the correct percentage but at 4 pip intervals not 20. Anyone here able to spot why will spare the cats more pain tomorrow: bool scaleOutStopLoss(int ticket) |
|
| Author: | SteveHopwood [ Fri Apr 03, 2020 1:21 pm ] |
| Post subject: | Moving Day |
1f is in post 1. The glitch with the scaling out was an incorrect divisor in one of the equations. I have added scaling back in as well. There is a quick and easy set file to turn everything on. Everything appears to be working as intended. |
|
| Author: | trader689 [ Fri Apr 03, 2020 6:35 pm ] |
| Post subject: | Moving Day |
great thanks Steve! trader |
|
| All times are UTC | Page 2 of 18 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|