Professional Documents
Culture Documents
1
UserManual
Molanis
Wehelptraders!
www.molanis.com
MolanisStrategyBuilder|UserManual
2
HowtoContactMolanis
Web:www.molanis.com
TechnicalSupport:support@molanis.com.CurrentlyMolanisoffersclient
supportinEnglish,French,andSpanish.
Sales:sales@molanis.com
NeedHelp?HaveQuestions?
AskourCommunitywww.molanis.com/forum
Donotmissourvideotutorialsatwww.molanis.com
COPYRIGHT2009.Molanis.Thesoftwaredescribedinthisdocumentisprovided
underalicenseagreementwhichcanbefoundonPage26.
MetaTraderisatrademarkofMetaQuoteswww.metaquotes.net.
MolanisStrategyBuilder|UserManual
3
TableofContents
MolanisStrategyBuilder3.1......................................................................................................................... 5
OVERVIEW ................................................................................................................................................... 5
FEATURESANDBENEFITS ................................................................................................................................. 5
MINIMUMSYSTEMREQUIREMENTS................................................................................................................... 6
INSTALLATION ............................................................................................................................................... 6
LICENSE........................................................................................................................................................ 6
GRAPHICALENVIRONMENT ............................................................................................................................. 7
MAINMENUS ................................................................................................................................................ 7
FileMenu............................................................................................................................................... 7
EditMenu.............................................................................................................................................. 8
ViewMenu ............................................................................................................................................ 8
FormatMenu ........................................................................................................................................ 9
TradingBlocksMenu............................................................................................................................. 9
TradingDiagramMenu......................................................................................................................... 9
HelpMenu............................................................................................................................................. 9
TOOLBAR.................................................................................................................................................... 10
TRADINGDIAGRAM ..................................................................................................................................... 10
ConfigurationBlock............................................................................................................................. 11
TechnicalAnalysis ............................................................................................................................... 15
LogicBlocks ......................................................................................................................................... 17
ExecuteOrderBlocks........................................................................................................................... 17
CloseOpenPositionsBlocks ................................................................................................................ 18
NotesBlock.......................................................................................................................................... 19
MolanisStrategyBuilder|UserManual
4
EndBlock............................................................................................................................................. 20
ConnectingBlocks ............................................................................................................................... 20
TradingFlow ....................................................................................................................................... 20
TradingPaths ...................................................................................................................................... 20
MovingAverageStrategy ................................................................................................................... 22
GLOSSARY .................................................................................................................................................. 25
LICENSEAGREEMENT ................................................................................................................................... 26
MolanisStrategyBuilder|UserManual
5
MolanisStrategyBuilder3.1
OVERVIEW
MolanisStrategyBuilderforMetaTraderprovidesahighlyintuitivegraphical environment with
acomprehensivesetofpredefinedtradingblocksthatletyoudesignexpertadvisorsandforex
signalsinminutes.Nocoding,programmingorMQLknowledgeisrequired.
The click, drag and drop approach of Molanis Strategy Builder allows you to create visual
representations of forex trading strategies and signals as you would with pencil and paper.
These trading diagrams are analyzed automatically by Molanis MQL code generator that
transforms them into ready to use expert advisors. The interactive graphical environment
simplifiesthedesignprocessandeliminatestheneedtowriteMQLcode.
FEATURESANDBENEFITS
MolanisStrategyBuilderisfullybasedonavisualenvironmentratherthanthetraditional,time
consumingcodingprocess.Itallowsyoutocreateexpertadvisorswithoutwritinganycode.
Reduce the Learning Curve, instead of focusing on learning programming languages like MQL,
justfocusonyourtradingideas.
Molanis Strategy Builder is targeted at nonprogrammers or programmers that want to
dramaticallyreducethedevelopmenttimeofforexstrategiesforMetaTrader(ExpertAdvisors).
Building forex strategies with Molanis Strategy Builder is so easy and intuitive that non
programmerscanstartcreatingexpertadvisorsinminutes.Noprogrammingskillsarerequired.
Easytounderstand.MolanisStrategyBuilderprovidestherightbalanceofcommonsensevisual
tools,whichwillquicklyenableanyonetounderstandanytradingdiagraminminutes.
LeadingEdgeCodeGenerationcreatesalltheMetaTradervariablesforyoutotestandoptimize
yourexpertadvisor.
Designedtoallowexpertadvisorswithmultiplecurrenciesandmultipletimeframes.
Normally, to create an expert advisor you have two options: 1) You learn
MQL4 (MetaQuotes Language Version 4) or in the near future MQL5, and
spendalongtimewritingandreviewingcode;2)Youhireaprogrammerand
shareyourtradingideas.
MolanisStrategyBuilderisthethirdoption.Yourbestoption.Itgeneratesall
the MQL code for you meaning you can focus solely on the forex strategy
andnotonthecoding.
MolanisStrategyBuilder|UserManual
6
Withminimumeffort,itcanbeusedtocreateForexSignals.
Fastdevelopmenttime.Youcanbuildyourownexpertadvisorsinminutes.
Keepyourtradingideastoyourself.Noneedtoshareyourknowledgewithprogrammers.
GivesyouaccesstoMolanisOnlineCommunity,MolanisForumandfreeexpertadvisors.
MolanisStrategyBuilderisprobablythemostadvancedgraphicenvironmentavailabletodayto
create expert advisors. With just a few clicks, you can create complex forex trading strategies
and transform them into fully functional expert advisors. Whether you are new to forex, a
professional trader or a MQL programmer, you can use Molanis Strategy Builder to rapidly
developpowerfulexpertadvisors.
MINIMUMSYSTEMREQUIREMENTS
TosuccessfullyinstallanduseMolanisStrategyBuilder,youmusthave:
WindowsXP,Professional,Server2003or2008,Vista.
PentiumIVcompatible2GHzprocessor,1GBofRAM,20MBofdiskspace.
Java1.4orhigher.
MetaTraderTerminal(Youcandownloaditfromhttp://www.metaquotes.net/terminal)
INSTALLATION
OnceyouhaveverifiedthatyourPCmeetstheminimumsystem requirementsrunMolanisSB3
installer.
During the installation process, it is recommended that you read, understandand agree to the
termsandconditionsunderwhichMolanisStrategyBuilderisreleased.
During the process you will be asked for your license information. Type your First Name, Last
Name and your License Key. The License Key is provided to you via email when you purchase
Molanis Builder Strategy. Please note that Beta Versions come with a Beta license so this step
maynotbeincludedintheprocess.
LICENSE
Molanis Strategy Builder is provided under a license agreement. A copy of this agreement can
befoundattheendofthisdocument.
Afreetrialdownloadthatrunsfor10daysisavailable.Thistrialhasonlyafewlimitations.Most
notably, you cannot see the MQL code of your EA. You will receive all the .ex4 files, fully
functionaltotrade,backtestandoptimize.InordertoseetheMQLcodeandallMQ4files,you
mustbuyMolanisStrategyBuilderandactivateyourlicense.
MolanisStrategyBuilder|UserManual
GRAPHICALENVIRONMENT
MolanisStrategyBuilderhasbeendesignedtobeintuitiveandeasytouse.Tocreateaforex
strategy,justdragtradingblocksfromtheTradingBlockLibraryanddropthemintoaTrading
Diagram.
MAINMENUS
Themainmenuislocatedundertheprogramheadingandhasallthecommandsandfunctions
youneedtobuildyourforexstrategy.
FileMenu
Thismenuincludescommandsforcreatingnewfiles(.molfiles),storingyourforexstrategyand
printingoptions.
MolanisStrategyBuilder|UserManual
EditMenu
Thismenuincludescommandsthatwillhelpyoumodifyyourcurrenttradingstrategy.
ViewMenu
Grid Turnsthegridonandoff.Acheckmark()nexttothefunctionindicatesthatthegridis
visible.
Rulers Turns the rulers on and off. A check mark () next to the function indicates that the
rulersarevisible.
Zoom Increases or decreases the size of the current trading diagram to a fixed percentage:
400%,200%,100%,75%,and50%
ZoomIn Increasesthesizeofthecurrenttradingdiagram.
ZoomOut Decreasesthesizeofthecurrenttradingdiagram.
Page Showsthecurrenttradingdiagraminonepage.
Width Adjuststhecurrenttradingdiagramsizetothewidthofthescreen.
ActualSize Showstheactualsizeofthecurrenttradingdiagram.
New Createsanewtradingdiagram.
OpenFile Opens an existing strategy (.mol file) already created in Molanis Strategy Builder.
The initial installation comes with a basic moving average strategy but additional
freestrategiescanwefoundatwww.molanis.com
Save Savesthecurrenttradingdiagram.
SaveAs Allows you to save your trading diagram with another name and/or in another
folder.Italsogivesyouthepossibilityofsavingyoutradingdiagramasanimage.
Print Printsthecurrenttradingdiagram.
Exit ExitsMolanisStrategyBuilder.
Undo Reversesthelastactionexecuted toyourtradingdiagram.
Redo Redothelastactionexecutedinyourtradingdiagram.
Cut Removesthecurrentselection.
Copy Createsareplicaofyourcurrentselection.
Paste Pastetheselectionyouhavealreadycutorcopied.
Delete Removesyourcurrentselectionfromthetradingdiagram.
SelectAll SelectalltheTradingBlocksinyourcurrenttradingdiagram.
MolanisStrategyBuilder|UserManual
9
FormatMenu
Theformatmenudisplaysformattingoptions.
Text Includesthefollowingfunctions:
FontColor:ChangestheFontcoloroftheselectedtext
Rotate:Rotatestheselectedtext.
Position: Move the selected text to the desired position within the trading
block.Horizontalposition:top,middleorbottom.VerticalPosition:left,center
orright.
Connector Showsformattingoptionsforconnectingarrows,suchasLineColor,Linewidth
and dashed or continuous line option. Line types include Straight, Horizontal,
andVertical,Curve.
TradingBlocksMenu
Showsthedifferentoptionsthatallowyoutoorganizethetradingblocksinthetradingdiagram.
ToBack Position the selected trading block at the back of other trading blocks or text
boxes(Notes)
ToFront Position the selected trading block at the front of other trading blocks or text
boxes(Notes)
Align Alignstheselectedtradingblockstothedesiredposition.Horizontal:left,right,
center.Vertical:top,middle,bottom.
TradingDiagramMenu
ValidateDiagram Checks the consistency of the trading diagram. It alerts when trading
blocksaremissingconnectionsorchangesonparametersareneeded.
GenerateMQL4code Creates the code of the forex strategy to be used with MetaTrader.
Twofilesarecreated,oneMQ4(code)andoneEX4(compiledcode).
MiniDiagram Showsaminimizedversionofthetradingdiagramatthebottomleft
corner of the screen. A check mark () next to the function indicates
thattheMiniDiagramisvisible.
Grid Changesgridstyle:gridsize,gridcolor,andgridtype.
HelpMenu
OnlineHelp TakesyoutoMolanisStrategyBuilderhelppagethatdescribestheproducts
features,tradingblocks,andprovidesexamplesofcommonforexstrategies.
MolanisCommunity ConnectsyouwithMolaniscommunityforumatwww.molanis.com/forum
MolanisStrategyBuilder|UserManual
10
ReportBugorRequest
Enhancement
Allowsyoutoreportbugsorrequestnewfeatures
SoftwareUpdates ChecksforthelatestreleaseofMolanisStrategyBuilder
BuyMolanisstrategy
Builder
AllowsyoutobuyalicenseforMolanisStrategyBuilderat
www.molanis.com
LicenseInformation Showslicenseinformationandexpirationdateifapplicable
AboutMolanisStrategy
Builder
ShowstheversionofMolanisStrategyBuilderrunning
TOOLBAR
TheToolbarprovideseasyaccesstothemostfrequentlyusedoptions.
Tip:Ashortdescriptionofthefunctionappearswhenyoumovethemouseovereach
icon
Thefunctionsthatyouwillfindinthetoolbarare:
FileOptions New,Open,Save,Print
EditOptions Cut,Copy,Paste,Delete,Undo,Redo
FontOptions Fonttype,Fontsize,Bold,Italic
FormatOptions Textpositioning,FontColor,LineColor,BackgroundColor(fortext
boxes/Notes)
ViewOptions Zoom
TRADINGDIAGRAM
A trading diagram is a graphical representation of a trading algorithm, forex strategy or expert
advisor. It shows the flow through a trading decision system. Trading diagrams are made of
tradingblocksthatareconnectedtocreatecomplexforexstrategies.
MolanisStrategyBuilderincludesanumberoftradingblocksusedwhenmodelingatrading
strategy.Theseinclude:
To create a trading diagram, you only need to add the trading blocks, set
theirconfigurationparametersandmakethenecessaryconnections.
MolanisStrategyBuilder|UserManual
11
ConfigurationBlock
START Tradingblockthatindicateswheretheforextradingstrategy
starts.TheSTARTiconalwaysappearsatthetopofthe
tradingdiagram.
TheSTARTtradingblockallowstheforexstrategy(Expert
Advisor)setup.Ithasthreemaingroupsofoptions:
a. GeneralOptions
b. TradingOptions
c. MoneyManagementOptions
ToaccesstheconfigurationoptionssimplydoubleclickontheSTARTtradingblockand
youwillbepromptedwiththefollowingscreen:
When the Expert Advisor code is generated, the options on the START trading block are
transformedintoMQLvariables.ThismeansthateachvariableintheSTARTtradingblockhasan
equivalentvariableonMetaTrader.
MolanisStrategyBuilder|UserManual
12
a. GeneralOptions
OPTION
DESCRIPTION
VARIABLEONMT4
AccountType SelectyouraccounttypebetweenMicro
andStandard.
IsMicroAccount=True
Defineifaccountismicroorstandard.True
meansyouraccountisMicroAccount.False
meansitisaStandardAccount.
ExecutionMode CompletedBars:Executioneverytimea
fullbariscompleted.EveryTick:
Executioneverytimeatickisreceived.
CompletedBars=True
Defineexecutionbybarsorticks.Truemeans
EAisexecutedeverytimeafullbaris
completed.FalsemeansEAisexecutedevery
timeatickisreceived.
ExecutionType Trade:Allowstrading.Alert:Doesnot
allowtrading.Instead,itshows/sends
emailswithalerts.
TradeOrAlert=False
Defineexecutiontype.Trueallowstrading,
FalsesendsAlerts.
eMailMode Sendsemailswiththeorderexecution
informationand/orwarnings.
SendMailMode=False
WhenTrue,TheEAsendsemailswithorder
executioninformation
PlaySound Playsasoundwhenorders/alarmsare
executed
PlaySounds=True
PlaysasoundwhenTrue.TheMT4variable
MySoundallowsyoutochangethesoundto
beplayed.
b. TradingOption
OPTION
DESCRIPTION
VARIABLEONMT4
TradingTimeFilter Allowstoopen/closepositionsaccording
toaSERVERtime(hour)filter.IfON,you
needtosetTradingHoursStartand
TradingHoursEnd.
UseTradingTime=False
IfTrue,tradesonlywhen
tradingtimestart<hour<
tradingtimeend
ForexSignals:Turnyourexpertadvisorintoatooltoadviseyouofmarket
changes and trading opportunities. Just change the Execution Type option
fromTradingtoAlertand yourexpertadvisorwillsendyoualertsinsteadof
trading. Alerts include sounds, a standard MetaTrader popup alert, and
emails.
MolanisStrategyBuilder|UserManual
13
OPTION
DESCRIPTION
VARIABLEONMT4
TradingHoursStart EAtradesonlywhenSERVERtimeis
betweentradinghoursstartandtrading
hoursend
TradingTimeStart=9
i.e.9=9am
TradingHoursEnd i.e.Totradefrom9amto4pmTrading
HoursStart=9andTradingHoursEnd=16
TradingTimeEnd=16
i.e.16=4pm
Buy/Sellorders
includeTP/SL
SomebrokersrequirethatyourBuy/Sell
ordersdonotincludeTP(TakeProfit)/SL
(StopLoss).Theseareaddedlater.
OrderIncludeTPSL=True
IfFalse,ordersareopenedandlater
TP/SLisadded
MaximumNumber
ofPositions
Controlsthemaximumnumberof
simultaneousopenpositionspercurrency
pair
MaxNumberofPositions=1
Allows1openpositionpercurrency
pair
NumberofRetry
AttemptsforOrder
Execution
NumberoftimestheEAretriesto
executeanorderwhenservererrorsare
detected
MaxOrderRetry=100
Ifthereisanerrorexecutingorders,
thescriptretriesMaxOrderRetry
times
BuyColor Colorusedfortheiconthatidentifiesbuy
ordersontheMetaTraderchart
BuyColor=Green
Colortoidentifybuyorders
SellColor Colorusedfortheiconthatidentifiessell
ordersontheMetaTraderchart
SellColor=Red
Colortoidentifysellorders
Automatically
AdjustSL/TPto
ServerAccepted
Levels
AdjustsTakeProfit(TP)andStopLoss(SL)
levelsabovetheminimumlevelallowed
bytheMT4server
AutoAdjustSLTP=True
ToturnOn(True)/Off(False)auto
adjustment.AdjustsSLtothree
timestheminimumSLallowed.
c. MoneyManagementOptions
Maximum
PercentageatRisk
Allowstosetamaximumpercentageof
yourequityatriskperposition.IfON,you
needtosettheMaximumPercentageat
RiskValue
UseMaximumPercentageatRisk=
False
Turnson/offmaximumrisk
condition
Maximum
PercentageatRisk
Value
Avalueof2=2%meansthatanyposition
thatriskmorethan2%ofequitywillbe
adjustedto2%reducingthelotsize
MaximumPercentageatRisk=2
i.e.maxsizeoftrade=2=2%of
equity
MolanisStrategyBuilder|UserManual
14
OPTION DESCRIPTION VARIABLEONMT4
RewardRiskRatio Usedtodeterminethelevelofriskina
trade.IfON,youneedtosetRewardRisk
RatioValue.
UseRiskRatio=True
Turnson/offriskratio
RewardRiskRatio
Value
I.e.RewardRisk=TakeProfit/StopLoss.If
RewardRisk=3andTakeProfit=30pips
thenStopLoss=30/3=10pips.Youmake
30pipsperwinningtradeandlose10pips
perlosingtrade.
RiskRatio=3
i.e.RiskRatio=3meansthat
TakeProfit/StopLoss=3
LotManagement Lotmanagementreducesthelotsizeafter
oneormoreconsecutivelosses.Youneed
toselectthelotmanagementtypeand
reductionfactor.
UseLotManagement=True
Turnson/offlotmanagement
LotManagement
Type
Type1:Lotdecreasesbyequation[lot
(lot*numberofconsecutivelosses/Lot
ReductionFactor)]
Type2:Lotisreducedusing25%steps
(75%,50%,25%)
LotManagementType=1
1setsType1,2setsType2
LotReduction
Factor
i.e.Whenlot=10,consecutivelosses=2
andLotReductionFactor=4,reduction
equationgivestheadjustedlotsize=10
(10*2/4)=5
ReductionFactor=4
Formoneymanagement,lotis
reducedaccordingtotheequation:
lot(lot*numberofconsecutive
losses/ReductionFactor)
AdditionalMT4variables:
EAName,itsvalueissettothefilenameofyourstrategy(.molfile).
Slippage,setat3pips.
PairVariables,MolanisStrategyBuilderautomaticallycreatesvariablesforeachcurrencypair
includedintheforexstrategy.Thesevariablescontainvaluesforlotsize(LS),takeprofit(TP),
stoploss(SL)andtrailingstops(TS).I.e.ForaEURCADstrategy,typicalvaluesinclude:
S_EURCAD_LS_0,S_EURCAD_TP_0,S_EURCAD_SL_0,S_EURCAD_TS_0,B_EURCAD_LS_0,
B_EURCAD_TP_0,etc
Pairvariablesareconstructedusingthefollowingstandard:
OrderTypeFirstletter(BuyorSell)+CurrencyPair+VariableUse(LS,TP,SL,
TS)+ReferenceNumber
i.e.S_EURCAD_LS_0isavariableforaSellorder,forEURCAD,andhasthevaluefor
the Lot Size. B_EURCAD_TP_0 is a variable for a Buy order, for EURCAD, containing
the Take Profit Value. Use these variables to optimize your EA when backtesting
yourstrategyinMetaTrader.
MolanisStrategyBuilder|UserManual
15
MetaTradervariablesareusedtotest,optimize,andbacktestyourexpertadvisorinMetaTrader
without having to edit your strategy with Molanis Strategy Builder. For example, changing
UseTradingTimevariableonMetaTraderfromFalsetoTruecreatesatimefilterforyourtrades.
ThismeansthatyourEAwilltradeonlywhentheServerTimeisbetweenTradingTimeStartand
TradingTimeEnd.
If you want to find the best trading time for your EA simply backtest your forex strategy
optimizingthevariablesTradingTimeStartandTradingTimeEnd.
TechnicalAnalysis
TA
TheTATechnicalAnalysistradingblockallowsyoutocreate
tradingconditionsusingwellknowntechnicalindicators.Itis
thekeybaseforthedevelopmentofforexstrategies.
To create a trading condition, edit the Technical Analysis trading block (TA), select a technical
indicator from the list on the left. Then set up the indicator parameters. Repeat the same
procedurefromthelistontheright.FinallyselectoneofthecomparisonoptionsandclickOK.
MolanisStrategyBuilder|UserManual
16
WellknowntechnicalindicatorsareavailabletobeusedComparisonOptions
The Trading Condition on the previous graph can be described as: Condition is true if the Ask
PriceforUSDCADishigherthan1.07866.
Currently,MolanisStrategyBuilderhasthefollowingtechnicalindicatorsavailable:
Accelerator/DeceleratorOscillatoriAC
Accumulation/DistributioniAD
AlligatoriAlligator
Ask
AverageMovementDirectionalIndexiADX
AverageTrueRangeiATR
AwesomeOscillatoriAO
BearsPoweriBearsPower
Bid
BollingerBandsiBands
BullsPoweriBullsPower
CloseiClose
CommodityChannelIndexiCCI
CustomIndicatoriCustom
DeMarkeriDeMarker
EnvelopesiEnvelopes
ForceIndexiForce
FractalsiFractals
MolanisStrategyBuilder|UserManual
17
GatorOscillatoriGator
HighiHigh
IchimokuKinkoHyoiIchimoku
LowiLow
MarketFacilitationIndexiBWMFI
MomentumiMomentum
MoneyFlowIndexiMFI
MovingAverageiMA
MovingAverageofOscillatoriOsMA
MovingAveragesConvergence/DivergenceiMACD
OnBalanceVolumeiOBV
OpeniOpen
ParabolicSARStopandReverseSystemiSAR
PercentRangeiWPR
RelativeStrengthIndexiRSI
RelativeVigorIndexiRVI
StandardDeviationiStdDev
StochasticOscillatoriStochastic
UserDefinedPriceUserPrice
LogicBlocks
AND
Producesavalueoftrueifandonlyifbothofits
precedingtradingblocksaretrue.
OR
Producesavalueoftruewheneveroneormoreofits
precedingtradingblocksaretrue.
ExecuteOrderBlocks
BUY
ExecutesaBuyOrder.Youneedtoselectthecurrencypair,Lot
Size,andthepipvalueforTakeProfit,StopLoss,andTrailing
Stop.(Avalueofzeropipsmeansdonotusethisoption)
MolanisStrategyBuilder|UserManual
18
SELL
ExecutesaSellOrder.Youneedtoselectthecurrencypair,
LotSize,andthepipvalueforTakeProfit,StopLoss,and
TrailingStop.(Avalueofzeropipsmeansdonotusethis
option)
CloseOpenPositionsBlocks
CLOSE
LONG
Closesalllongpositionsfortheselectedcurrencypair
MolanisStrategyBuilder|UserManual
19
CLOSE
SHORT
Closesallshortpositionsfortheselectedcurrencypair
NotesBlock
To add text to a Note or text box, select it and start typing. Your text will appear inside. In the
toolbar, you can find formatting options to change the font size, font type, color, and
background.
NOTES
Allowsyoutowriteyouownnotesabouttheforex
strategy.Alsocalledtextbox.
MolanisStrategyBuilder|UserManual
20
EndBlock
ConnectingBlocks
To connect two trading blocks, click one of the blocks you are trying to connect and without
lettinggoofthemousedragthearrowtotheotherblock.Iftheconnectingarrowisgreen,the
connection is allowed. A red arrow indicates that the connection is not possible. When you
release the mouse button, the link is created. Once connected, trading blocks stay connected,
eveniftheyaremoved.Alltradingblocksshouldbeconnected.Theonlyexceptiontothisruleis
theNotesblockortextboxesthatdonotconnectedtoanytradingblocks.
Bydefault,connectingarrowsarecurvedbutyoucanchangetheirformatontheFormatMenu
>Connector.
TradingFlow
ATradingFlowisapipelinethroughwhichticksflow.Itshowshowtheprice(ticks)movefrom
the START block to the END block passing through interconnected trading blocks. Connecting
arrowsrepresentthedirectionoftheflow,whichalwaysinitiatesintheSTARTblockandfinishes
attheENDBlock.
The flow of the trading diagram allows a reader to understand the trading strategy: what
operationswillbeperformed,inwhichorder,andunderwhatcircumstances.
TradingPaths
TradingpathsarethepossiblepathsformedwhengoingagainstthetradingflowfromtheEND
totheSTARTblock.Iflogicconditionsarepresent(ANDOR),theprecedenttradingblocksare
consideredtobepartofthesametradingpath.
END
TradingBlockthatindicateswherethestrategy
finishes.AlltradingflowsmustendattheEND
block.
CONNECTING
ARROWS
Connectingarrowslinktradingblocksand
definetradingflowdirection.
MolanisStrategyBuilder|UserManual
21
Trading paths are independent for you to have major control of your forex strategy. However
this means that you have to design coherent trading strategies. For example, the following
tradingdiagram,althoughwellconnected,isnotacoherentstrategy.Itcanbereadas:
BuyandSellatthesametime,1lotofEURCAD(witha100piptakeprofitand50pipstoploss)
whentheshortperiodmovingaverage(9)isabovethelongperiodmovingaverage(18).
Molanis Strategy Builder does not check for coherence. It is therefore your responsibility to
developaclearunderstandingofyourforexstrategy.
There are several common modeling rules that you need to follow when creating trading
diagrams:
TradingflowmovesfromSTARTtoENDblock.
MolanisStrategyBuilder|UserManual
22
Thetradingdiagrammusthaveatleastonecompletetradingpath.
STARTconnectstoTechnicalAnalysis(TA)only.
TechnicalAnalysis(TA)connectstoAND,OR,BUY,SELL,CLOSELONG,andCLOSESHORT
only.
ANDconnectstoBUY,SELL,CLOSELONG,andCLOSESHORTonly.
ORconnectstoBUY,SELL,CLOSELONG,andCLOSESHORTonly.
ENDreceivesconnectionsfromBUY,SELL,CLOSELONG,andCLOSESHORTonly.
Notes(textbox)cannotconnecttoanyblock.
If possible, rearrange your trading diagram to get rid of crossed lines and add a Note
with a short description of the trading strategy. Also, to avoid confusion, keep the
directionofthetradingflowconsistent.
MovingAverageStrategy
Typically,twomovingaveragescanbeusedtocreateaforexstrategywiththeserules:
Buywhentheshortperiodmovingaverageisabovethelongperiodmovingaverage
Sellwhenthelongperiodmovingaverageisabovetheshortperiodmovingaverage
On the following graph from MetaTrader Terminal, the yellow line is the short period moving
average (9) and the red line is the long period moving average (18). So we could rewrite the
tradingrulesorforexsignalsas:
Buywhentheyellowlineisabovetheredline
Sellwhentheyellowlineisbelowtheredline
Toomanyrules?Donotworry.MolanisStrategyBuilderwillnotallowyou
tomakeawrongconnection.
MolanisStrategyBuilder|UserManual
23
Insteadofspendingalongtimecodingthisforexstrategy,withMolanisStrategyBuilderyoucan
createatradingdiagramthatrepresentsthemovingaveragestrategyinminutes.Justdragand
droptwoTechnicalAnalysisblocks,oneBuyblockandoneSellblock.Connectthemandsetthe
blockparameterstogetadiagramlikethefollowing:
This trading diagram has two trading paths. The left one is highlighted. It goes from the START
block to the END block. Remember to read the trading diagram in opposite direction to the
tradingflow.Onecouldreaditas:
Buy 1 lot of EURCAD (with a 100 pip Take Profit and 50 pip Stop Loss) when the short period
moving average (9) is above the long period moving average (18). How do we know the short
andlongperiod9and18?IfyoumovethemouseovertheTechnicalAnalysisblockandwaitfor
acoupleofsecondsyouwillseethefollowing:
Therighttradingpathcouldbereadas:Sell1lotofEURCAD(witha100pipTakeProfitand50
pip Stop Loss) when the long period moving average (18) is above the short period moving
average(9).
MolanisStrategyBuilderusestheconceptofopenpositionsanddoesnotallowhedging(inpart
to comply with new regulations in place in North America and in part due to our consultants
experience with other platforms). This means that a new EURCAD Buy order will close all
outstanding EURCAD short positions before being executed. On the same lines, a new EURCAD
SellorderwillclosealloutstandingEURCADlongpositionsbeforebeingexecuted.
MolanisStrategyBuilder|UserManual
24
GeneratingtheMQLcodeforMetaTrader
OntheTradingDiagramMenu,clickonGenerateMQL4CodetogettheMQL4Codewindow.
MolanisStrategyBuilderallowsyoutoopenyourexpertadvisordirectlywithMetaTraderorto
saveitasanMQ4file.
MolanisStrategyBuilder|UserManual
25
GLOSSARY
EA Expert Advisor short program written in MQL that implements a forex strategy. EAs are
automatedprogramsthatinvestforyou.
MQL MetaQuotes Language is the language used to write expert advisors (EA, or forex
strategies)andtechnicalindicatorsforMetaTrader.
TRADINGBLOCKSmaincomponentsofatradingdiagram.
MolanisStrategyBuilder|UserManual
26
LICENSEAGREEMENT
WARNING:Thisprogramisprotectedbycopyrightlawandinternationaltreaties.
MOLANISSOFTWARELICENSEAGREEMENT
ENDUSERLICENSEAGREEMENTFORMOLANISSOFTWAREMolanisStrategyBuilder
NOTICE TO USER: PLEASE READ THIS CONTRACT CAREFULLY. BY USING ANY PORTION OF THE
MOLANIS STARTEGY BUILDER SOFTWARE ("SOFTWARE") YOU ACCEPT ALL THE TERMS AND
CONDITIONS OF THIS AGREEMENT. ALSO YOU AGREE THAT THIS AGREEMENT IS ENFORCEABLE
LIKE ANY WRITTEN NEGOTIATED AGREEMENT SIGNED BY YOU. THIS AGREEMENT IS
ENFORCEABLEAGAINSTYOUANDANYLEGALENTITYTHATOBTAINEDTHESOFTWAREANDON
WHOSEBEHALFITISUSED.IFYOUDONOTAGREE,DONOTUSETHISSOFTWARE.
MolanisownsallintellectualpropertyintheSoftware.MolanispermitsyoutoUsetheSoftware
onlyinaccordancewiththetermsofthisAgreement.
1.Definitions."Software"means(a)allofthecontentsofthefiles(providedeitherbyelectronic
download, on physical media or any other method of distribution), disk(s), CDROM(s) or other
media with which this Agreement is provided, including but not limited to (i) Molanis Strategy
Builder software (ii) related explanatory written materials or files ("Documentation"); and (iii)
upgrades, modified versions, updates, additions, and copies of the Software, if any, licensed to
you by Molanis (collectively, "Updates"). "Use" or "Using" means to access, install, download,
copy, or otherwise benefit from using the functionality of the Software in accordance with the
Documentation. "Permitted Number" means one (1) unless otherwise indicated under a valid
license (e.g., volume license) granted by Molanis. "Computer" means an electronic device that
acceptsinformationindigitalorsimilarformandmanipulatesitforaspecificresultbasedona
sequence of instructions. "Term" means duration granted to you for the use of the software.
"Molanis"meansMolanis,Canadiancorporation,locatedonTorontoM4P0A5.
2.SoftwareLicense.IfyouobtainedtheSoftwarefromMolanis,andsubjecttoyourcompliance
with the terms of this agreement (this "Agreement"), Molanis grants to you a nonexclusive,
limited, personal license to Use the Software during the Term to use the Software and for the
purposesdescribedintheDocumentationasfollows.
MolanisStrategyBuilder|UserManual
27
2.1GeneralUse.YoumayinstallandUseacopyoftheSoftwareonyourcompatibleComputer,
up to the Permitted Number of computers. The Software may not be shared, installed or used
concurrentlyondifferentcomputers.
2.2 No Modification. You may not modify, adapt, translate or create derivative works based
upon the Software. You may not reverse engineer, decompile, disassemble or otherwise
attempttodiscoverthesourcecodeoftheSoftware.
2.3 YOUR USE OF THE SOFTWARE IS AT YOUR OWN RISK. MOLANIS MAKES NO WARRANTIES,
CONDITIONS, INDEMNITIES, REPRESENTATIONS OR TERMS, EXPRESS OR IMPLIED, WHETHER BY
STATUTE, COMMON LAW, CUSTOM, USAGE OR OTHERWISE AS TO ANY OTHER MATTERS,
INCLUDING BUT NOT LIMITED TO NONINFRINGEMENT OF THIRD PARTY RIGHTS, TITLE,
INTEGRATION,ACCURACY,SECURITY,AVAILABILITY,SATISFACTORYQUALITY,MERCHANTABILITY
OR FITNESS FOR ANY PARTICULAR PURPOSE. Because software is inherently complex and may
notbecompletelyfreeof errors,youareadvisedtoverifyyourwork.Innoeventwill Molanis
beliablefordirect,indirect,special,incidental,orconsequentialdamagesarisingoutoftheuse
oforinabilitytousethesoftware,hardware,ordocumentation,evenifadvisedofthepossibility
of such damages. In particular, Molanis is not responsible for any costs, including, but not
limited to, those incurred as a result of the use of the software, loss of data, the costs of
recoveringsuchsoftwareordata,thecostofsubstitutesoftware,claimsbythirdparties,orfor
othersimilarcosts.
2.4 Indemnity. You agree to hold Molanis harmless from any and all liabilities, losses, actions,
damages, or claims (including all reasonable expenses, costs, and attorneys fees) arising out of
orrelating toanyuseof, orrelianceon,theSoftware.Because softwareisinherentlycomplex
andmaynotbecompletelyfreeoferrors,youareadvisedtoverifyyourwork.Innoeventwill
Molanisbeliablefordirect,indirect,special,incidental,orconsequentialdamagesarisingoutof
the use of or inability to use the software, hardware, or documentation, even if advised of the
possibilityofsuchdamages.Inparticular,Molanisisnotresponsibleforanycosts,including,but
not limited to, those incurred as a result of the use of the software, loss of data, the costs of
recoveringsuchsoftwareordata,thecostofsubstitutesoftware,claimsbythirdparties,orfor
othersimilarcosts.
2.5 Limit of Liability. UNDER NO CIRCUMSTANCES WILL MOLANIS BE LIABLE TO YOU, OR ANY
OTHER PERSON OR ENTITY, FOR ANY LOSS OF USE, REVENUE OR PROFIT, LOST OR DAMAGED
DATA, OR OTHER COMMERCIAL OR ECONOMIC LOSS OR FOR ANY DIRECT, INDIRECT,
MolanisStrategyBuilder|UserManual
28
INCIDENTAL, SPECIAL, STATUTORY, PUNITIVE, EXEMPLARY OR CONSEQUENTIAL DAMAGES
WHATSOEVER RELATED TO YOUR USE OF THE SOFTWARE. IN NO EVENT WILL MOLANIS BE
LIABLETOYOUFORANYDAMAGES,CLAIMSORCOSTSWHATSOEVERORANYCONSEQUENTIAL,
INDIRECT,INCIDENTALDAMAGES,ORANYLOSTPROFITSORLOSTSAVINGS,EVENIFAMOLANIS
REPRESENTATIVEHASBEENADVISEDOFTHEPOSSIBILITYOFSUCHLOSS,DAMAGES,CLAIMSOR
COSTS OR FOR ANY CLAIM BY ANY THIRD PARTY. In no case shall Molanis' liability exceed the
amountofthelicensefee.
2.6TermandTermination.ThetermgrantedtoyoufortheuseoftheSOFTWAREisfor1year.
ThetermofthisAgreement(the"Term")willcommenceonthedateyoubuytheSoftware,and
willcontinueuntilterminatedbyeitherparty.YoumayterminatethisAgreementatanytimeby
deinstallingtheSoftwareanddestroyingallcopiesoftheSoftwareinyourpossessionorcontrol.
Molanis may terminate this Agreement at any time for any reason or no reason. Molanis may
terminate this agreement before the term is completed if you fail to comply with any of the
terms and conditions of this agreement. In such event, you must destroy all copies of the
SOFTWARE.Molaniswillmakecommerciallyreasonableeffortstoprovidenoticeoftermination
througha dialogboxdisplayedbythe Softwarewhentheterm hasexpired, butnosuch notice
will be required in order for Molanis' termination to be effective. On the expiration or
termination of this Agreement, you will cease using the Software, and the Software may cease
functioning.
3.Transfer.Youmaynotrent,lease,sublicense,assignortransferyourrightsintheSoftware,or
authorizeall oranyportionoftheSoftwaretobecopiedontoanother user'sComputerexcept
as may be expressly permitted herein. You may, however, transfer all your rights to Use the
Softwaretoanotherpersonorlegalentityprovidedthat:(a)youalsotransfer(i)thisAgreement,
and (ii) the Software and all other software or hardware bundled or preinstalled with the
Software, including all copies, Updates and prior versions, to such person or entity, (b) you
retainnocopies,includingbackupsandcopiesstoredonaComputer,and(c)thereceivingparty
accepts the terms and conditions of this Agreement and any other terms and conditions upon
whichyoulegallypurchasedalicensetotheSoftware.Notwithstandingtheforegoing,youmay
nottransfereducation,prerelease,ornotforresalecopiesoftheSoftware.
4. Intellectual Property Ownership, Copyright Protection. The Software and any authorized
copiesthatyoumakearetheintellectualpropertyofandareownedbyMolanis.Thestructure,
organization and code of the Software are the valuable trade secrets and confidential
information of Molanis. The Software is protected by law, including without limitation the
copyright laws ofCanadaand other countries, and by international treaty provisions. Except as
MolanisStrategyBuilder|UserManual
29
expressly stated herein, this Agreement does not grant you any intellectual property rights in
theSoftwareandallrightsnotexpresslygrantedarereservedbyMolanis.
5.Updates.IftheSoftwareisanUpdatetoapreviousversionoftheSoftware,youmustpossess
avalidlicensetosuchpreviousversioninordertoUsesuchUpdate.AllUpdatesareprovidedto
you on a license exchange basis. You agree that by Using an Update you voluntarily terminate
your right to use any previous version of the Software. As an exception, you may continue to
Use previous versions of the Software on your Computer after you Use the Update but only to
assist you in the transition to the Update, provided that: (a) the Update and the previous
versionsareinstalledonthesamecomputer;(b)thepreviousversionsorcopiesthereofarenot
transferredtoanotherpartyorComputerunlessallcopiesoftheUpdatearealsotransferredto
such party or Computer; and (c) you acknowledge that any obligation Molanis may have to
supportthepreviousversionsoftheSoftwaremaybeendeduponavailabilityoftheUpdate.In
no event shall Molanis be obligated to provide you with Updates following the expiration or
terminationofthisAgreement,andinitssolediscretionmayterminateupdatesforanyversion
oftheSoftwareotherthanthemostcurrentversion.
6. NO WARRANTY. The Software is being delivered to you "AS IS" and Molanis makes no
warranty as to its use or performance. Molanis provides no technical support, warranties or
remediesfortheSoftware.MOLANISCANNOTWARRANTTHEPERFORMANCEORRESULTSYOU
MAYOBTAINBYUSINGTHESOFTWARE.
7. Governing Law. This Agreement will be governed by and construed in accordance with the
substantive laws in force: (a) in the province of Ontario, Canada. This Agreement will not be
governed by the conflict of law rules of any jurisdiction or the United Nations Convention on
ContractsfortheInternationalSaleofGoods,theapplicationofwhichisexpresslyexcluded.
8.GeneralProvisions.IfanypartofthisAgreement isfoundvoidandunenforceable,itwillnot
affect the validity of the balance of this Agreement, which shall remain valid and enforceable
according to its terms. This Agreement shall not prejudice the statutory rights of any party
dealing as a consumer. This Agreement may only be modified by a writing signed by an
authorized officer of Molanis. Updates may be licensed to you by Molanis with additional or
differentterms.ThisistheentireagreementbetweenMolanisandyourelatingtotheSoftware
and it supersedes any prior representations, discussions, undertakings, communications or
advertisingrelatingtotheSoftware.
MolanisStrategyBuilder|UserManual
30
9.CompliancewithLicenses.Ifyouareabusinessororganization,youagreethatuponrequest
from Molanis or Molanis' authorized representative, you will within thirty (30) days fully
documentandcertifythatuseofanyandallSoftwareatthetimeoftherequestisinconformity
withyourvalidlicensesfromMolanis.
10. Prerelease Product Additional Terms. If the product you have received with this license is
precommercial release or beta Software ("Prerelease Software"), then the following Section
applies. To the extent that any provision in this Section is in conflict with any other term or
condition in this Agreement, this Section shall supersede such other term(s) and condition(s)
with respect to the Prerelease Software, but only to the extent necessary to resolve the
conflict. The term granted to you for the use of the prerelease version is for 15 days or the
indicated when installing the software. You acknowledge that the Software is a prerelease
version,doesnotrepresentfinalproductfromMolanis,andmaycontainbugs,errorsandother
problemsthatcouldcausesystemorotherfailuresanddataloss.Consequently,thePrerelease
Softwareisprovidedtoyou"ASIS",andMolanisdisclaimsanywarrantyorliabilityobligationsto
youofanykind.WHERELIABILITYCANNOTBEEXCLUDEDFORPRERELEASESOFTWARE,BUTIT
MAYBELIMITED,MOLANIS'LIABILITYSHALLBELIMITEDTOTHESUMOFONEDOLLARS(U.S.$1)
IN TOTAL. You acknowledge that Molanis has not promised or guaranteed to you that Pre
release Software will be announced or made available to anyone in the future, Molanis has no
expressorimpliedobligationtoyoutoannounceorintroducethePrereleaseSoftwareandthat
Molanis may not introduce a product similar to or compatible with the Prerelease Software.
Accordingly,youacknowledgethatanyresearchordevelopmentthatyouperformregardingthe
PrereleaseSoftwareoranyproductassociatedwiththePrereleaseSoftwareisdoneentirelyat
your own risk. During the term of this Agreement, if requested by Molanis, you will provide
feedback to Molanis regarding testing and use of the Prerelease Software, including error or
bugreports.
11.InjunctiveRelief.ThepartiesagreethatifyouutilizeorotherwiseuseanyoftheSOFTWARE
in an unauthorized manner, or breach the remaining terms and conditions of this agreement,
that such use or breach would have a devastating and serious impact on Molanis continuing
ability to compete profitably and would, therefore, result in immediate and irreparable injury,
lossordamagetoMolanis.Thepartiesagreethatinsuchevent,inadditiontoMolanisrightto
recover damages for a breach of this agreement, Molanis would be entitled to obtain a
temporaryrestrainingorderorapreliminaryinjunctionfromacourtofcompetentjurisdictionto
preventYou,youremployees,agents,consultants,orindependentcontractorsfromengagingin
any further use of the SOFTWARE or the continued breach of the remaining terms and
conditionsofthisagreement.
MolanisStrategyBuilder|UserManual
31
12. Miscellaneous. You acknowledge that Molanis collects and sends to Molanis certain
information regarding the users of the Software, including certain personally identifiable
information as well as certain information from the user's computer, including certain
information about your computer software and hardware such as your IP address, operating
system,Webbrowsersoftwareandversion.Youherebyconsent toMolanis' collectionanduse
of such information, and agree that Molanis' collection and use of such information will be
governedbyMolanis'PrivacyPolicy.
If you have any questions regarding this Agreement or if you wish to request any information
from Molanis please use the address and contact information included with this product or via
thewebatwww.molanis.com
Molanis.Wehelptraders!
WARNING:Tradinghaslargepotentialrewards,butalsolargepotentialrisk.Youmustbeaware
of the risks and be willing to accept them in order to invest. Don't trade with money you can't
afford to lose. The past performance of any trading system or methodology is not necessarily
indicative of future results. Hypothetical or simulated performance results have certain
limitations. Unlike an actual performance record, simulated results do not represent actual
trading. Also, since the trades have not been executed, the results may have underorover
compensatedfortheimpact,ifany,ofcertainmarketfactors,suchaslackofliquidity.Simulated
tradingprogramsingeneralarealsosubjecttothefactthattheyaredesignedwiththebenefit
ofhindsight.
The risk of loss in trading foreign exchange markets (FOREX), also known as cash foreign
currencies, the interbank market or the FOREX markets, can be substantial. You should
therefore carefully consider whether such trading is suitable for you given your financial
condition. FOREX trading involves substantial risk and is not for all investors. Investments or
tradingintheFOREXmarketscanbehighlyspeculativeandshouldonlybedonewithriskcapital
whichyoucanaffordtoloseandthat,iflost,wouldnotchangeoradverselyaffectyourlifestyle.
Thehighdegreeofleveragethatisoftenpossibleinforeignexchangetradingcanworkforyou
aswellasagainstyou.Theuseofleveragecanleadtolargelossesaswellasgains.ALTHOUGHIT
ISPOSSIBLETOPROFITBYTRADINGFOREIGNEXCHANGE,ITISALSOPOSSIBLETOLOSE100%OF
YOURDEPOSIT.