Vous êtes sur la page 1sur 12

TDesk Trading Partner User Guide

TDesk
TDesk is a work of genius created by Thomas – SHF user name tomele. There are
insufficient words to describe the unbelievably brilliant nature of his work. It has changed
the face of trading for ever. Suddenly, viewing the state of umpteen charts is easy; so is
accessing them.

OK, so we have had dashboards before that facilitated this – including some coded by
Thomas.

The difference here is that TDesk allows us to set up our charts with our own choice of
compatible indicators that send data to TDesk. TDesk then computes when it is time to
enter and exit trades and shows this information on screen. On its own, that is a trading
game-changer. Moving on......

Introduction to Desky
TDesk Trading Partner is the EA that automates reacting to TDesk's signals. I have given
this EA the nickname of, “Desky” because we all know that a rubbish EA name will lead to
rubbish results, and names do not come much more rubbish than, “TDesk Trading
Partner”.

The purpose of Desky is to help you automate your own trading systems without needing
to know even a single line of MQL4, the language use to create EA's, indicators and
scripts for trading. You:
• Set up TDesk.
• Add your choice of TDesk-compatible indicators to a chart and save the template.
• Tell TDesk the name of the template and he will start receiving data from the charts.
• Apply Desky to a chart and watch him work with TDesk to do the actual trading.

Fantastic.

Desky takes the signals generated by TDesk and sends and manages trades. There is a
thread that introduces noobs to TDesk: follow this link to read the thread.

TDesk and Desky are both Expert Advisors and you need two Include files:
• Go to TDesk Announcements and download these two files from the bottom of
Deskyt 1:
◦ TDesk.ex4 goes in your platform's Experts folder.
◦ TDesk.mqh goes in your platform's Include folder.
◦ TDeskSignals.mqh goes in your platform's Include folder.
• Now go to here and download Desky from the bottom of of post 1:
◦ TDesk Trading Partner EA.mq4 goes in your platform's Experts folder.

Then go to the TDesk Indicators Collection and download all of the TDesk-compatible
indicators into your platform's Indicators folder.

--------------------------------
A quick aside for those of you so new and confused that you cannot even find the relevant
folders on your platform. The Cretins at Cappersoft do not make it easy unless you have
been around for a while. Here is what to do:
• Download the EA's, Include and Indicator files I have pointed to and park them
somewhere – maybe set up a new folder for them on your desktop.
• Go to your MT4 platform and click “File” at the top left.
• You will see an open folder icon half way down the menu, with the legend, “Open
Data Folder” next to it. Click the folder to open it.
• Windows Explorer will open up – this might take a few seconds if yours is a new
platform.
• The fourth folder down is the “MQL4” folder. Open it up in the usual way.
• The first folder in the new pane is the Experts folder. Open it and drag/drop the two
EA's onto it.
• Click the back arrow to return to the pane with Experts at the top. The “Include”
folder is the fourth one down, so open it and drag/drop the two .mqh files onto it.
• Back arrow again. The next folder down is the Indicators folder, so open it and
drag/drop all the indicatos.

Close Explorer. Shut down and restart your MT4 platform. Everything will be happily
installed.

There is a way for you to install your platform where you want it installed. I posted how to
here.

Both the EA's need to go on an XAUUSD chart. To find it:


• Right click on the Market Watch window (showing all the prices coming in).
• Scroll down to “Symbols” and click it to open the “Symbols” window.
• Open “Metals – gold”.
• Click “XAUUSD (Gold vs US Dollar).
• Click “Show” and close the window.
• Scroll down to the XAUUSD chart at the end of the Market Watch window – you
can't miss it.
--------------------------------

Desky opens and closes trades according to signals generated by TDesk. There are four
of these signals:
1. NONE: do absolutely nothing. This signal is most likely to be generated at times
when the spread has widened dramatically, so you do not want to be trading or
trying to mange open trades.
2. FLAT: close open trades. The signal that generated them has vanished, so close
them.
3. LONG: open a buy trade.
4. SHORT: open a sell trade.

Getting started quickly


The great news is that noobs need to understand very little to get started quickly and
easily. There are three quick-and-easy setups for you to play with:
• Thomas's here.
• Mine here. Ignore the XY42 EA's. You just want the templates.
• Leon's here.

All three setups are for manual trading of the signals generated by TDesk but Desky's job
is to automate what would otherwise be us humans opening and closing trades, so:
• Open two XAUUSD charts.
• Apply the relevant TDesk template to the first one. This will load TDesk with all the
inputs set up for you.
• Click on, “Open all charts” at the bottom left. It will take a fair few seconds so be
patient, but eventually all the charts will open with the template loading the relevant
indicators. These will immediately start sending their data to TDesk.
• Go to the second XAUUSD and create a blank screen – I have uploaded a template
to here that will do this for you.
• Load Desky onto this chart, select your lot size, trade comment and magic number.
Sit back and watch.

Desky
Desky makes no trade opening and closing decisions for himself. It is TDesk that makes
these decisions based on data sent to it by the compatible indicators on your charts.

Desky is merely a drone, so do not fret about its inputs for now, apart from your lot size
and maybe trade comment. The usual chart feedback is drastically cut back. The clocks
are there to show the Desky has not stopped working.

For now, there are only a few inputs:

• General inputs:
◦ EventTimerIntervalSeconds: Desky does not fire at every tick sent to the
chart. Instead it fires ever x no of seconds. This input tells it how often to fire and
defaults to once a second. This is the smallest number that can be input here.
◦ EveryTickMode: this tells Desky to send trades only at the open of a new
candle. Remember that Desky makes no trading decisions on his own so
indicators so indicators might need adapting. Take an example:
▪ You are trying this: buy SuperSlope D1 and H4 line up long, the H1 crosses
from negative to positive. The H1 had to close negative two candles ago and
positive at the close of the previous candle.
▪ SuperSlope is not coded to send this signal to TDesk and so would need
considerable adaptation.
◦ EveryTickTimeFrame: this tells Desky which time frame to use if
EveryTickMode is 'false'.
◦ Lot: your chosen lot size. Make sure your lot size is acceptable to your criminal.
◦ RiskPercent: this tells an EA to calculate the lot size as a risk percentage of
your account balance. It uses the pips count in StopLossPips.
◦ LotsPerDollopOfCash: you can have your lot size automatically calculated this
lot size per amount of cash in the account balance or equity. The default settings
would deliver 0.01 lots per $1,000. A zero input turns this feature off.
◦ SizeOfDollop: the cash increments used.
◦ UseBalance: use the account balance for the calculation.
◦ UseEquity: use the account equity for the calculation.
▪ Example of use, choosing the equity:
• equity = $2133.56
• LotPerDollopOfCash = 0.01.
• SizeOfDollop = $1,000.
• Calculated lot size is 0.02.
◦ Magic number and trade comment: leave these alone unless you know what
you are doing.
◦ MaxSlippagePips: 'slippage' is the price changing in between you sending off
your trade and it being accepted by the market maker on the other side of your
trade. The trade is cancelled if slippage exceeds this figure.
◦ IsGlobalPrimeOrECNCriminal: set this to true if your criminal insists on two-
stage order-sending; this means sending the order first then adding any take
profit and stop loss figures in a second round of communication with the crim's
server. This is irrelevant if you do not use StopLoss and TakeProfit. The EA has
code to detect Global Prime accounts automatically.
◦ MaxSignalAgeMinutes: we do not want to enter a trade if the signal that
generated it happened a long time ago. This input tells Desky not to enter a
trade if the signal is older than this. The default of 30 is purely to have a default;
the value of yours will depend on the time frame you are trading.
◦ WriteFileForTestDatabase: tells Desky to communicate with the Tests
Database. Find out about this here.
◦ PostTradeAttemptWaitSeconds: We need more safety to combat the cretins at
Crapperquotes managing to break Matt's OR code occasionally. Desky will
make no further attempt to trade for PostTradeAttemptWaitSeconds seconds,
whether he detects a receipt return or not.
• Trading styles:
◦ SendImmediateMarketTrade: tells Desky to send a trade immediately TDesk
generates a trading signal.
◦ Pending trades: also known as 'stop' orders:
▪ SendPendingTrades: tells Desky to send a pending order when TDesk
generates a signal.
▪ TypeOfPendingTrade: the order type. You are offered a list of allowable
inputs, so you cannot enter an imDeskysible setting.
▪ DistanceFromMarketPips: how far away from the current market price to
set the pending.
• Trade exit strategies:
◦ TakeProfitValue: your take profit sent with individual trades.
◦ StopLossValue: your stop loss sent with individual trades.
◦ SLTPCalcMode: Thomas designed this. Desky takes your TakeProfitValue and
StopLossValue and offers you three ways to calculate the stops:
▪ FixedPips: this treats TakeProfitValue and StopLossValue as though they
are 'hard' stop values.
▪ PriceFractions: this causes TakeProfitValue and StopLossValue to be
treated as fractions of the current price. Here is the explanation that Thomas
sent me:
• I am used from stocks and options trading to set TPs and SLs in percent
of price. For example a TP of 10% means a $20 stock has to move $2,
while a $200 stock has to move $20.
• This problem is to a smaller degree also existent in Forex. Lets take
USDCAD with a price around 1.30 and NZDUSD with a price around
0.65. To achieve a 100 pips TP, NZDUSD would have to move twice as
much than USDCAD in relation to the price.
• A pip is defined as a change of ±1 at the 5th digit of price. Hence the
10000th (0.0001) fractions. 100 of these fractions equal 100 pips if the
price is exactly 1.0..
▪ ATRPercent: his causes TakeProfitValue and StopLossValue to be treated
as a percentage of the D1, 14 period ATR.
◦ CloseTradesOnFlatSignal: this tells Desky to close all trades when the signal
changes from LONG or SHORT back to FLAT. You define how TDesk defines
FLAT for an exit in Tdesk's SuperSignalsExitOperator input. I have mine set to
MultiSignalsOnly as the default of MultiORSoloSignals was causing trades to
close too quickly.
◦ CloseOnOpDeskyiteSignal: this will only kick in if you have disabled
CloseTradesOnFlatSignal. This default of “true” makes Desky:
▪ Close buy trades on a sell signal.
▪ Close sell trades on a buy signal.
• Grid inputs: this allows Desky to send a grid of stop and/or limit orders as well as
the initial market order following TDesk generating a signal.
◦ UseGridTrading: turns this feature on/off.
◦ TypeOfGrid: the order type. You are offered a list of allowable inputs, so you
cannot enter an imDeskysible setting.
◦ GridSize: the number of pending orders to send initially. More will be added if
the market retraces below the lowest buy and above the highest sell.
◦ DistanceBetweenTradesPips: the interval in pips between the individual stop
orders in the grid.
◦ UseAtrForGrid: this allows you to use ATR to calculate
DistanceBetweenTradesPips dynamically. ATR stands for “Average True Range”
and is explained well in this article: ATR explained. Find it via your platform's
Navigator/Indicators/Oscillators window. The advantage of using this is that your
grid can be more widely spaced when there has been a period of high volatility,
or closer when volatility was low. The following three inputs allow you to set your
ATR inputs:
▪ GridAtrTimeFrame: the time frame for the calculation.
▪ GridAtrPeriod: the period over which the calculation is made:
• The default time frame and period means that the calculation is done on
the previous four week's trading.
▪ GridAtrDivisor: this is used to divide the ATR value into fractions of the
whole and thus the spacing of the grid.
• Basket trading: this is for those of us wanting to trade either individual pairs as a
basket, and/or treating every trade sent by Slopey Peaky Bob as part of a whole-
Deskyition basket:
◦ Individual pairs: this is treating each pair as its own basket with its own profit
target:
▪ TreatIndividualPairsAsBasket: turns this feature on/off.
▪ IndividualBasketTargetPips: a target in pips. Slopey Peaky Bob will ignore
this target if it is set to 0.
▪ IndividualBasketTargetCash: a target in cash. Slopey Peaky Bob will
ignore this target if it is set to 0.
▪ IndividualBasketCashPercentageTarget: this is c1borg's dynamic cash TP
calculated as a percentage of the account balance.
▪ Dynamic individual pair basket take profit: these inputs allow you to
calculate a dynamic IndividualBasketTargetCash basket cash take profit:
• UseDynamicCashTPIndividualPair: turns this feature on/off.
• CashTakeProfitIndividualePairPerLot: a notional target for a one lot
trade. Slopey Peaky Bob calculates the basket cash take profit by
multiplying this figure by the value of your Lot input. The default would
give a $10 TP on 0.01 lot sizes, so play with it:
◦ This includes lot sizes based on RiskPercent and
LotsPerDollopOfCash.
▪ There is a TP value displayed on the chart so you know where you are.
◦ All trades belong to a single basket: this is treating all trades with the EA's
magic number as part of a whole-Deskyition basket. The use of the three inputs
TreatAllPairsAsBasket, BasketTargetPips and BasketTargetCash should be
obvious. You are seriously in the wrong forum if not.
▪ BasketCashPercentageTarget: his is c1borg's dynamic cash TP calculated
as a percentage of the account balance.
▪ HighestCashUpl and HighestPipsUpl: these are to help you work out your
optimum basket TP. You will see them displayed on your chart when there
are trades open. They allow you to reset these values after a platform or EA
restart. Remember to reset them to zero after a basket closure.
• Dynamic basket take profit: these inputs allow you to calculate a
dynamic TreatAllPairsAsBasket basket cash take profit:
◦ UseDynamicCashTP: turns this feature on/off.
◦ CashTakeProfitPerLot: a notional target for a one lot trade. Slopey
Peaky Bob calculates the basket cash take profit by multiplying this
figure by the value of your Lot input. The default would give a $30 TP
on 0.01 lot sizes, so play with it:
▪ This includes lot sizes based on RiskPercent and
LotsPerDollopOfCash.
▪ There is a TP value displayed on the chart so you know where you
are.
• Basket Trailing Stop: this feature was added by SHF member 1of3.
Once the cash value of our basket reaches a point of our choosing, a
cash trailing stop kicks in. The idea is to catch more of the moves that are
in our favour than is Deskysible with our standard basket take profit. We
can use this to lock in profit whilst hoping to reach a much larger basket
TP. There are both cash and pips trails available.
◦ Inputs for the cash TS are:
▪ UseBasketTrailingStopCash: turns this feature on/off. Note that it
is disabled by default.
▪ BasketTrailingStopStartValueCash: the basket profit at which
the TS kicks in. The default is based on a 0.01 lot size on a Global
Prime account.
▪ BasketTrailingStopGapValueCash: the distance between the
stop loss and the basket profit. The default is based on a 0.01 lot
size on a Global Prime account.
◦ The equivalent inputs for the pips TS end in “Pips” instead of “Cash”.
◦ Basket trailing stop as a percentage of the account balance: note
that enabling this automatically disables UseBasketTrailingStopCash:
▪ UseBasketTrailingStopPercentage: turns this TS on/off.
▪ BasketTrailingStopStartValuePercent: the percentage of the
account balance at which to trigger the trail.
▪ BasketTrailingStopGapValuePercent: the percentage of the
account balance by which to trail the Deskyition profit.
▪ For example:
• Account balance = $10,000;
• BasketTrailingStopStartValuePercent = 0.5%.
• BasketTrailingStopGapValuePercent = 0.1%.
◦ SPB will start trailing when the cash profit on the basket
reaches $50.
• SPB will trail the basket cash profit by $10.
• Recovery: imagine this scenario:
◦ You have a buy trade open.
◦ The market drops 100 pips and Desky has left a buy stop at the buy trade open
price minus DistanceBetweenTradesPips (imagine this is 50), using the fill-the-
gap feature.
◦ The market rises and fills the stop order. We have two market trades.
◦ The market falls another 100 pips (yep, it happens) so Slopey Peaky Bob leaves
another buy stop order.
◦ The market rises again and fills the stop order. We now have 3 market trades:
▪ Trade 1 is -100 pips.
▪ Trade 2 is -50 pips.
▪ Trade 3 is at 0 minus the spread.
◦ Now imagine the market rises 50 pips:
▪ Trade 1 is -50 pips.
▪ Trade 2 is at breakeven.
▪ Trade 3 is at +50 pips.
◦ .We are at break even over the group of trades and can close without loss, or at
worst with a tiny one from commission, spread and swap. That is what Recovery
is all about, and is a modified version of Bob's 10.x teaching. The inputs are:
▪ UseRecovery: turns this feature on/off.
▪ TradesToStartLookingForRecovery: the number of market trades that
need to be open before Slopey considers the Deskyition to be in need of
Recovery.
▪ MinimumLosersToTriggerRecovery: we only need Recovery if we have
some losers. This input specifies the number of losing trades to trigger
looking to close out at breakeven.
▪ RecoveryProfitPips: no need to suffer the pain of Recovery without some
reward, so this input tells Desky how many pips profit to lock in before
closing the group of trades.
• Hedging: this allows you to take opposite direction trades when a signal changes,
without closing the original trades. Desky holds the total lot sizes of a group of
trades and you can control the percentage of them to send with the hedge:
◦ HedgeOnOppositeDirectionSignal: this instructs Desky to send a hedge trade
when TDesk generates an opposite direction signal i.e.:
▪ Send a sell hedge trade when there are existing buys open.
▪ Send a buy hedge trade when there are existing sells open.
◦ CloseHedgeOnOppositeSignal:
▪ Closes a buy hedge trade when TDesk shows SHORT.
▪ Closes a sell hedge trade when TDesk shows LONG.
▪ HedgeTradeComment: this is how Desky knows that a trade is a hedge. I
suggest you leave this alone if you are new to all this.
▪ PercentageToHedge: this is a percentage of the total lots ope. For example:
• You have HedgeOnOppositeDirectionSignal enabled.
• You have four 0.01 lot buy trades open.
• TDesk generates a SHORT signal.
• Let's say that PercentageToHedge = 100:
◦ The hedge trade lot size will be 0.04 lots.
• Let's say that PercentageToHedge = 50:
◦ The hedge trade lot size will be 0.02 lots.
• Trading hours. This is fantastic functionality provided by Baluda.
◦ Sort these out for yourself, using the information here. Never ask questions
about it in my threads. You will regret doing so should you ignore this warning.
◦ use the 24 hour clock format.
◦ Enter trading periods in your broker's server time; use the EA's time display at
the top of your chart to work out the difference between your broker and your
local time.
◦ Enter as many trading times as you want:
▪ precede trading start times with a '+' e.g. +08.00
▪ precede trading stop times with a '-' e.g. -13.15
▪ separate each value with a comma. Do not leave spaces.
▪ An example. Imagine you want to trade between 7 and 11 am and 1 and 5.30
pm, your input will look like this:
• +07.00,-11.00,+13.00,-17.30
◦ DeletePendingTradesOutsideTradingTimes: this is also applied to the
individual days functions. This tells Desky to delete stop and limit orders when
we are outside our trading hours. This only applies when there are no market
trades already open.
• Inputs applied to individual days: these allow extra control over when you trade
on individual days. Enter these in your own local time, 24 hour format. An input of
24 or more disables the feature. Zero means midnight:
◦ FridayStopTradingHour: the hour on Friday at which the EA will stop initiating
new trading cycles. It will continue to monitor and manage open Deskyitions.
◦ SaturdayStopTradingHour: the equivalent of FridayStopTradingHour for our
friends in Upside Down land.
◦ TradeSundayCandle: for those whose broker has a Sunday candle. You might
not want your EA trading the moment the markets open.
◦ MondayStartHour: the time on Monday to start trading. The default is London's
opening in the UK.
◦ TradeThursdayCandle: Thursday is often a market reversal day, so you may
not want to initiate new trading cycles on this day.
• Trading done for the week inputs: This applies to treating the whole open position
as a basket and is all to do with the way the baskets move. They commonly take a
couple of days to reach their take profit, so a basket sent on Thursday is usually
open over the weekend. Most of us like to be out of the markets over the weekend.
There is also this lovely quote from a post by Thomas in response to my enquiring
whether there was a demand for this feature: “Being the guy who is after the big
fish (like 10,000 pips as basket target), I would say yes. Lets say such a basket
took 5 weeks to develop and closes on Tuesday or Wednesday. I would like to
enjoy that for the rest of the week. Especially on turnaround Thursday and boring or
possibly volatile NFP Friday I wouldn't want a new cycle to start then. So yes, this
feature looks useful to me.”
◦ UseTradingDoneForTheWeek: turns this feature on/off.
◦ TargetDay: the day on which you want Slopey Peaky Bob to stop trading after a
basket closure.
◦ WeeklyCashTarget: stop trading once you have made this cash profit.
◦ WeeklyPipsTarget: stop trading once you have made this profit in pips.
◦ Dynamic target profit calculation: this allows you to base your target profit on
a multiple of your basket take profit:
▪ UseDynamicWeeklyTargetCash: calculates a target profit in cash.
▪ UseDynamicWeeklyTargetPips: calculates a target profit in pips.
▪ WeeklyTargetBasketTpMultiplier: Slopey Peaky Bob multiplies your basket
take profit by this figure to create your target profit. Some examples:
• Your whole basket cash TP is $30: your WeeklyTargetBasketTpMultiplier
is 2: Slopey Peaky Bob will knock off for the week once your profits hit
$60, i.e. two closed baskets.
• Your whole basket pips TP is 500 pips: your
WeeklyTargetBasketTpMultiplier is 2: Slopey Peaky Bob will knock off for
the week once your profits hit 1000 pips i.e. or two closed baskets.
▪ SlippageTolerancePercent: “Slippage” is the difference between the price
we want a trade to close and the price at which it actually closes. A basket
can easily have 20 open trades and will take a few seconds to close, even
though Slopey Peaky Bob closes all the market trades before deleting the
pendings. Slippage can run in our favour; the basket often hits TP with the
speed of an express train and the basket can close at more than we
intended. We might want to keep on trading if slippage caused the baskets to
close. For example:
◦ our weekly cash profit target is $100 and SlippageTolerancePercent is
10%. We are happy to call it a week so long as our profit for the week
is $91 or more. Less that $91 and we want to keep trading.
• BasketFridayTargets: this brilliant feature was added by John (SHF user name
1of3) . It will set the Basket Cash or Pip Take Profit progressively lower throughout
the day on a Friday.
◦ BasketFridayCashTargets: a CSV string of times in hours, and values, which
will lower the BasketTargetCash at the time you specify:
▪ For example the following setting "10,30,12,20,14,10,16,5,18,1" for the
BasketFridayCashTargets will change the Basket Cash Take profit to 30 at
10am, 20 at 12noon, 10 at 2pm, 5 at 4pm and 1 at 6pm (times are in 24 Hour
format, local time not broker time).
◦ BasketFridayPipsTargets: a CSV string of times in hours, and values, which
will lower the BasketTargetPips at the time you specify:
▪ For example the following setting "10,200,12,150,14,100,16,50,18,20" for the
BasketFridayPipsTargets will change the Basket Pip Take profit to 200 at
10am, 150 at 12noon, 100 at 2pm, 50 at 4pm and 20 at 6pm (times are in 24
Hour format, local time not broker time).
• Rollover time: this is the time at which brokers apply their swap charges. Spreads
widen hugely during this period – anything up to 30 times their normal spread. You
do not want your EA doing anything during this period:
◦ DisableEaDuringRollover: stops normal EA behaviour. You will see an
example of how to set the times in the EA's inputs window.
• Trade balance filters: these help you to avoid entering trades that could prove
detrimental if the market turns against you for a particular currency, and to avoid
entering trades at news-release times.
◦ UseZeljko: named after Zeljko who corrected the code for this filter and made it
work. This filter ensures 'balanced' trading. The easiest way to describe it is to
use hypothetical trades. Imagine that:
▪ this EA buys GBPUSD.
▪ this EA buys GBPJPY. You are now heavily exDeskyed to GBP.
▪ Something unexpected happens (and something unexpected always
happens in Forex) and the pound plummets, dropping like a stone into the
abyss. Both your trades scream into huge drawdown.
▪ To avoid this, having taken the GBPUSD trade, this EA will not buy another
GBPxxx pair. Imagine instead that a Sell GBPJPY trade arises, just before
the market plummets. This time, your GU trade is screaming into the abyss,
but your GJ trade is going stratospheric. One trade 'balances' the other in the
event of something dramatic happening.
◦ OnlyTradeCurrencyTwice: works in conjunction with UseZeljko. Again, imagine
the above scenario nos 1 & 4. Now you have a GU Buy and a GJ sell open –
perfectly balanced trades. If you now further trade any pair involving GBP, you
will unbalance your trading again, leaving you exDeskyed to unexpected events.
This filter prevents a third trade being opened involving GBP.
◦ Note: both UseZeljco and OTCT work more deeply than the example I have just
given. For example, now you have a GU buy open, balanced trading does not
allow a further buy xxxUSD trade to open, only a sell xxxUSD – then OTCT
kicks in again........... Got a headache yet?
• Swap filter: some pairs have dreadful swap in one direction. This filter allows you
to avoid trading pairs in the direction that would cost a fortune in swap. How much
relevance this has to a system that could follow a trend for hundreds of pips is open
to debate, but once you have seen one of these adverse-swap pairs hang around
going nowhere for a couple of weeks, you will see why a lot of us want nothing to do
with them.
• Margin checks: these help avoid over-trading by limiting the number of trades that
can be opened. this EA will make the calculations before sending a trade and abort
if there is insufficient margin to allow further trading. There are two to chose from;
the default indicates my preference.
◦ Scoobs check: scooby-doo is a former pro trader with the big banks; we have
benefited hugely from his advice. This filter compares the current account
margin with the free margin divided by 100, and aborts the trade if the margin is
greater than the result of this calculation.
◦ ForexKiwi check.ForexKiwi contributed this filter. It looks at the margin percent
figure and aborts the trade if yours is less than the figure you specify in
FkMinimumMarginPercent.
• Maximum trading pairs: this is another anti-overtrading filter. It allows you to limit
the number of pairs that can have open trades:
◦ MaxPairsAllowedToTrade: this is the limit to the number of pairs you will allow
to trade simultaneously. Desky will initiate trading on no further fresh pairs once
this maximum is reached.
• Trade Management: The remaining inputs are all about individual trade
management. Management is a cut-down module from my Multi-purpose trade
management EA available from here. The full management EA has a wide range of
extra features, and there is a User Guide to describe it. Features included here:
◦ Break even settings: set a break even stop loss after the price reaches the
setting in BreakEvenPips. You can use this in conjunction with the Part-closure
routine (details later), as well as a stand-alone routine.
▪ UseBreakEven: set to true to enable this facility.
▪ BreakEvenPips: the number of pips you want the market to move in your
favour before setting the stop loss to the order entry price, ensuring the trade
cannot turn into a loss.
▪ BreakEvenProfit: will add this to the stop loss to a buy order, subtract it for a
sell order. My default of 2 pips means the sl is set to break even + 2,
ensuring a minimum of 2 pips profit. Set it to 0 if you do not want this feature.
◦ Jumping stop loss settings: this will jump the stop loss by JumpingStopPips
when the price moves in your favour by that number of pips. Many traders
consider this to be a better option than a straight trailing stop. The first time this
option is triggered by the market price, it will set the stop loss to break even.
After that, it will increment the sl by JumpingStopPips every time the market
moves sufficiently in your favour.
▪ JUseumpingStop: set to true to enable this facility.
▪ JumpingStopPips: the number of pips to jump. For example, my default of
300 works like this:
▪ Market price hits order open price + 300: moves sl to break even.
▪ Market price hits order open price + 600: moves sl to + 300.
▪ Market price hits order open price + 900: moves sl to + 600.
◦ Candlestick jumping stop. This jumps the stop at the close of a candle:
▪ UseCandlestickTrailingStop: turns this on/off.
▪ CstTimeFrame: this allows you to use a different time frame to that of the
chart. Use integer values to correspond with your chosen time frame I.e. 1
for M1, 240 for H4, 1440 for D1 etc.
▪ CstTrailCandles: the number of candles ago to use as the trail. For
example, you are in a buy trade and want the stop loss to trail the default of
1, then the EA will set the stop at the low of the previous candle, so long as
this is higher then the current stop loss.
▪ TrailMustLockInProfit: tells the EA to start moving the stop loss only when it
will be moved to > break even.
◦ Trailing stop loss settings: works like the conventional trailing stop you can
enter into the MT4 platform.
▪ UseTrailingStop: turns this on/off.
▪ TrailingStopPips: your trail distance.
• Shirt protection: we have a saying in the UK; “He gambled, and lost his shirt”. In
other words, lost everything. Desky has a global stop loss applied to the entire
position, and will close all the trades it is managing if their combined loss reaches
this stop loss:
◦ UseShirtProtection: turns this feature on/off.
◦ MaxLoss: This the maximum acceptable draw down that you can tolerate
before closing all trades. Do not worry if you forget to input this as a negative
number; Desky will convert it for you.

Including non TDesk compatible indicators


This is still possible but you do need to understand how to use the iCustom() call. You
would insert the call/s after Desky had read TDesk's signal and before sending a trade.

Do a search in the .mql file for, “//Note to coders adding non TDesk compatible indicators.
Here is where you would put your iCustom call.” and insert your call/s as shown.

Disclaimer and Risk Disclosure:


Trading foreign exchange on margin carries a high level of risk, and may not be suitable
for all investors. The high degree of leverage can work with as well as against you. Before
deciding to invest in foreign exchange you should carefully consider your investment
objectives, level of experience, and risk appetite. The possibility exists that you could
sustain a loss of some or all of your initial investment and therefore you should not invest
money you cannot afford to lose. You should be aware of all the risks associated with
foreign exchange trading, and seek advice from an independent financial advisor should
you have any doubts.

I will put this a tad more bluntly:


Most Forex traders lose all their money.
• Using this EA in trading Forex does not guarantee success.
• Trading with this EA could lead to serious financial loss.
• Trading this EA without understanding its underlying what TDesk does guarantees
traders will lose their money.

Good luck. Have fun.

Vous aimerez peut-être aussi