Forum

How to enable/disable these candles?

I want to add ON/OFF button,I created the button but I do not know how to type the script which will enable/disable my candles. What should I cling to? #property copyright "Æèòíåâ Ìèõàèë aka MikeZTN" #property link "ICQ 138092006" #property indicator_chart_window #define BUTTON_NAME "Button" ;

How to put here profit for 1 day?

I dont want it be profit for current opened trades (if I type AccountInfoDouble( ACCOUNT_PROFIT ). I want overall daily profit. How can I do that? Comment ( StringFormat ( "Profit = %.2f" ), // what next

"expressions are not allowed on a global scope"

Does it mean I should write the code under the event handling function? I'm doing it here, but still error. void OnTick () { double takeProfit = NormalizeDouble ( Point *TakeProfitS, Digits ); double stopLoss = NormalizeDouble ( Point *StopLossS, Digits ); double shortStopLoss = Bid + stopLoss;

how to put strings (AccountBalance && AccountEquity) in a row?

I found the multiple line section in documentation, but didn't understand how to separate functions. Comment ( StringFormat ( "Equity is %.2f" , AccountEquity()));

These numbers are frozen (screenshot). They are not moving while the trade is being opened.

int OnInit () { //--- indicator buffers mapping Comment ( StringFormat ( "Equity = %.2f; Balance = %.2f; Free Margin = %.2f" , AccountInfoDouble ( ACCOUNT_EQUITY ), AccountInfoDouble ( ACCOUNT_BALANCE ), AccountInfoDouble ( ACCOUNT_MARGIN_FREE ) ) ); //--- return ( INIT_SUCCEEDED ); } How to

Rounding is not working

I checked with MathRound, NormalizeDouble and Round. Nothing works. I want to round my AccountEquity. How? int OnInit () { //--- indicator buffers mapping Comment ( StringFormat ( "Equity is %f" , AccountEquity())); NormalizeDouble (AccountEquity(), 1 ); //--- return ( INIT_SUCCEEDED ); }

I'm tired of these infinite errors. What's wrong here?

//+------------------------------------------------------------------+ //| BreakevenEA.mq4 | //| Igor Muratov | //| https://www.mql5.com |

Command for trade automatic closing when (condition)

Please tell me an example of a script or a documentation page so that I can understand how I can write a command so that, for example, after the price reverses towards the stop loss , the adviser will close this deal when it reaches -x% of the deposit