paul selvan / Publications
Forum
OrderCalcMargin
hello, The instruction OrderCalcMargin () works perfectly when written in script But when used in an indicator we got Error n° 4014 ERR_FUNCTION_NOT_ALLOWED Is this instruction works on script but not in indicator regards
symbol retail leverage
Hello , I'm using [broker name redacted] mt5 plateform if account leverage is given by instruction : AccountInfoInteger ( ACCOUNT_LEVERAGE ) But each symbol has sometimes different retail leverage value. e.g. My plateform leverage is 30 But CFD Gold retail leverage is 5 And CFD Tesla retail leverage
how to extract datas from Symbol specification window and import them in an indicator
Hello, I'm trading on MT5. I'm looking for ideas to write an indicator(or EA). In fact each symbol got specifications From there I want to extract these datas : 1) value of "½ Minimal volume" 2) value of "eur/lot" from "Margin rates : ½ Market buy" 3) value of "eur/lot" from "Margin rates : ½ Market
symbol exchange between two templates
Hello There are 2 templates A and B in my mt5 How to transfer or copy symbol (in which i have drawn technical levels) from A to B template
how to find leverage and minimum lot size for each symbol
Hello, Each symbol need different minimum lot or leverage. These two values are used to calculate margin = lot_size x contract_size / leverage. For example : CFD sp500 has minimum_lot = 0.1 and leverage =20 CFD ibex35 , min_lot = 0.1 and leverage = 10 CFD nas100 , min_lot = 0.02 and leverage = 20
Error when call 2 times CopyBuffer()
Hello , This custom indicator should draw 7 & 20 period SMA #property indicator_chart_window #property indicator_buffers 2 #property indicator_plots 2 #property indicator_label1 "iMA1" #property indicator_type1 DRAW_LINE #property indicator_color1 clrWhite #property indicator_style1
in which chart runs an EA
Hello I got many charts opened(USDJPY,GBPUSD,...) at the same time in my mt4 plateforme In one of this chart ,runs an EA Visually we can see in which chart it runs But is it possible programly to know the chart ID number in which the EA runs between all others Regards
dialog class and a subwindow
hello, "hIndicator_dialog_class_only.mq4" is an indicator which creates a dialog class #property indicator_chart_window //+------------------------------------------------------------------+ #include <Controls\Dialog.mqh> class hClass: public CAppDialog{ public : hClass();
vertical lines
hi these codes draw verticale lines (where datetime t and string p are known) ObjectCreate ( 0 , p, OBJ_VLINE , 0 , t, 0 ); ObjectSetInteger ( 0 , p, OBJPROP_COLOR , clrYellow ); ObjectSetInteger ( 0 , p, OBJPROP_STYLE , STYLE_SOLID ); ObjectSetInteger ( 0 , p, OBJPROP_SELECTABLE , false ); Here are
multicurrency datas with OnChartEvent() and EventChartCustom()
Hello, There are MT5 programs where OnChartEvent() and EventChartCustom() are used to get multicurrency datas The program is explained in this article Is it possible to adapt it for MT4 ... because what i tried is bugging