| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Desky. TDesk's trading drone. https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5545 |
Page 36 of 50 |
| Author: | tomele [ Mon Nov 18, 2019 11:19 pm ] |
| Post subject: | Desky. TDesk's trading drone. |
You can't explain this to my wife, can you? Jokes aside, we should work on something similar when it comes to news events. Cheers |
|
| Author: | SteveHopwood [ Tue Nov 19, 2019 12:50 am ] |
| Post subject: | Desky. TDesk's trading drone. |
Don't expect any greater success on my behalf than you have already enjoyed. I will try my best mind. Maybe one day, but I will take some convincing that they are worth taking notice of. I stopped taking notice of them a long time ago. In the meantime, Renes' EA communicates with all my EA's and deals with news events rather well. Sing out if I have missed out something vital in Desky that means he does not communicate with Rene's EA (http://www.stevehopwoodforex.com/phpBB3 ... 30#p150930) |
|
| Author: | renexxxx [ Tue Nov 19, 2019 7:10 am ] |
| Post subject: | Desky. TDesk's trading drone. |
Another way to deal with this problem, is by not sending the trade with a hard SL and TP, but doing this (trade closing) logic in the OnTick() handler. You can then check the spread and only do what you need to do if spread does not exceed a certain MaxSpread parameter. I know that this is much more work, especially in a Multi-Symbol EA, but it would also protect the trade if the spread widens outside rollover time. Anyway, ignore my ramblings if this is totally besides the point. |
|
| Author: | tomele [ Tue Nov 19, 2019 10:05 am ] |
| Post subject: | Desky. TDesk's trading drone. |
TDeskSignals.mqh provides much more information than only the signals found in the TDeskSignals[] array. Altogether there are eight arrays holding information for each symbol. Of particualr interest for this discussion are the following two: TDeskSpreads[] TDesk has an algorithm for detecting unusual spreads, which can be configured by the user. In TDesk, new signals are blocked if this function is enabled and unusual spreads are detected. This state is then signaled to Desky via the TDeskSpreads[] array. The values are of TDESKSPREADS enum type: NORMAL, ABNORMAL, STOPHUNT. If the state for a symbol is other than NORMAL, Desky's stop orders are at risk. The two other states have informational character and don't need to be evaluated. TDeskNews[] TDesk also has an algorithm for detecting news events, which can be configured by the user. It is based on René's library. In TDesk, new signals are blocked for a certain time before and (optional) after news events if this function is enabled. This state is then signaled to Desky via the TDeskNews[] array. The values are of TDESKNEWS enum type: NONEWS, LOWNEWS, MEDIUMNEWS, HIGHNEWS. If the state for a symbol is other than NONEWS, Desky's stop orders are at risk. The three other states have informational character and don't need to be evaluated. Cheers |
|
| Author: | SteveHopwood [ Tue Nov 19, 2019 11:20 am ] |
| Post subject: | Desky. TDesk's trading drone. |
Great Thomas. Thanks. This makes hiding the sl/tp and reacting to news events/wide spreads easy to code into Desky. |
|
| Author: | SteveHopwood [ Tue Nov 19, 2019 5:01 pm ] |
| Post subject: | Desky. TDesk's trading drone. |
V 3y is in post 1. From the updated trade exit strategies section of the user guide: At the mo, this only prevents closure during rollover. Abnormal spread and news events are coming tomorrow. |
|
| Author: | SteveHopwood [ Tue Nov 19, 2019 8:40 pm ] |
| Post subject: | Desky. TDesk's trading drone. |
V 3z is in post 1. I was in the mood for a little gentle coding tonight - especially as Thomas and Rene have already done the hard work for me. I have added functionality to deal with unacceptable spreads and impending news events. There is a new inputs section, "Spread, news and rollover inputs" just above, "Counter trend scalping" that holds the relevant inputs. I think their meaning is obvious, but read the user guide if you are unsure. I moved the rollover code to this section - makes sense to me. Coders wanting to check what I have done, find the enum newsEvents section currently at line 90, the inputs section at line 411, then do a search for doNewsAndSpreadThgingies to find the function and where it is called in OnTimer(). |
|
| Author: | tomele [ Tue Nov 19, 2019 8:56 pm ] |
| Post subject: | Desky. TDesk's trading drone. |
Perfect collaboration between TDesk and Desky on this subject! One little amendment, though. The level you set for news impact in TDesk will be the minimum level Desky can respond to. For example, if you set TDesk to react only to HIGH impact news, only those will be signaled to Desky. Then Desky can not react to LOW or MEDIUM impact news, no matter what you configure. Just so you know, guys. Cheers Thomas |
|
| Author: | SteveHopwood [ Tue Nov 19, 2019 9:10 pm ] |
| Post subject: | Desky. TDesk's trading drone. |
I have added a teensy bit to the UG along these lines. Mind, anyone unable to work this out for itself cannot use either TDesk or Desky and is doomed to Forex failure anyhow, so it doesn't really matter. |
|
| Author: | SteveHopwood [ Wed Nov 20, 2019 3:45 pm ] |
| Post subject: | Desky. TDesk's trading drone. |
V 4 is in post 1. I realised that hiding the take profit and stop loss prices stops the scaling out feature from working, so V4 fixes this. The DIY is simple. Navigate to: bool scaleOutStopLoss(int ticket) Scroll down to this comment: //Cannot work this function if there is no stop loss. Turn the two lines of code that follow into comments by inserting // in front of the code. The code will turn gray. The function needs to calculate a notional stop loss, so scroll down a couple more lines to this comment: //Save stuff for easier typing The order of the snippet that follows needs a slight rearrangement and then the code to calculate the notional stop loss needs adding. The easiest way is to copy this over the top of the existing block: Code: Select all |
|
| All times are UTC | Page 36 of 50 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|