Forum

Package manager like composer in php

Hello, I cannot find something like composer in php, or npm in javascript for mql5. Where is it or how is it called? Or there is no one? Then how do you deal with reused code in multiple projects

MQL5 function which calculates position size by risk and SL

Have tried searching and implementing but cannot find correct example. Its weird because it should be needed for lot of people and should exist somewhere. Can you give a link or code for that? So far I have done by examples this double calculateLotSizeForPips( double slPips, double

Assign array to multidimentional array

Hello, I do not get what is wrong: CHistoryPosition historyPosition; string header[ 5 ]; header[ 0 ] = "Time close" ; header[ 1 ] = "Win/Loss by MT4" ; header[ 2 ] = "Win by me from difference" ; header[ 3 ] = "Loss from swap" ; header[ 4 ] = "Loss from

'=' - operand expected when trying to assign constant - solved

#define FLAT = "h1_flat" ; //... some code string trend = FLAT; Getting error '=' - operand expected SignalGenerator.mqh 69 25 When I do not use constant but assign string, no error. Does not make sense. What is wrong here? How to assing constant to variable? Update: solved - had to be this way. But

Why my stop loss amount is more than 3x bigger than calculated?

I have calculated what should be SL, position size: https://www.babypips.com/tools/position-size-calculator So it is about 0.79 so 0.79 lots. But for me hit SL after 6.9 pips and loses few times more than it should - 175.48 Why is that

Why arrow is not drawed on chart?

void OnTick () { // Print("tick event"); /*ObjectCreate("pasol", OBJ_ARROW, 0, Time[0], 104.9, Time[0], 104, Time[0], 104.1); //draw an up arrow ObjectSet("pasol", OBJPROP_STYLE, STYLE_SOLID); ObjectSet("pasol", OBJPROP_ARROWCODE, SYMBOL_ARROWUP); ObjectSet("pasol"