MQL4 - How to extract data of an string Array/JSON - page 2 12 New comment Marco vd Heijden 2018.03.01 09:19 #11 If it works it's probably ok. It looks ok so i expect it to work. ezequielgodoy 2018.03.01 12:39 #12 Guys, In that script I have function to calculate the Lots, but this is not work for all pairs. //+------------------------------------------------------------------+ //| Calculate Lot Size Per Trade | //+------------------------------------------------------------------+ double CalcLotSize(string symbol, double RiskPercent, double RiskInPips) { double LotSize = 0; //We get the value of a tick double nTickValue = MarketInfo(symbol, MODE_TICKVALUE); double _digits = MarketInfo(symbol, MODE_DIGITS); //If the digits are 3 or 5 we normalize multiplying by 10 if(_digits==3 || _digits==5){ nTickValue=nTickValue*10; } // Lots = Equity * Risk% / (Stop Loss in Pips * Pip Value) / 100 LotSize = NormalizeDouble(AccountEquity()*(RiskPercent/100)/RiskInPips*nTickValue,_digits); LotSize = MathRound(LotSize/MarketInfo(symbol,MODE_LOTSTEP))*MarketInfo(symbol,MODE_LOTSTEP); if(LotSize<0.01) LotSize=0.01; return(LotSize); } double CalcLotSize(string symbol, double RiskPercent, double RiskInPips) symbol = "EURUSD"RiskPercent = 2RiskInPips = 160 Someone can help me with this one? trade at time HELP!! i need a Simple info display on Alain Verleyen 2018.03.01 23:55 #13 ezequielgodoy: Guys, In that script I have function to calculate the Lots, but this is not work for all pairs. symbol = "EURUSD"RiskPercent = 2RiskInPips = 160 Someone can help me with this one?Off topic...and discussed 3 million times on the forum. ezequielgodoy 2018.03.02 18:07 #14 Alain, can you put the link here please? Alain Verleyen 2018.03.02 18:39 #15 ezequielgodoy: Alain, can you put the link here please?You can't even search yourself ? I don't have a link, but I know there are a lot of topics about this. Do your home work please. David 2018.11.28 19:13 #16 try to use percent based equity to calculate the lots wh000 2021.09.23 12:26 #17 Marco vd Heijden #: You can also just use csv. I want to send a post request. But i have some question in JSON. the params is params = { msgtype: 'markdown', markdown: { title: 'wh', text: text }, }; res=WebRequest("POST", url, headers, 3000, data, result, str); Can you help me? And how to encode the JSON params to char array?Thank you. Bug in Web API Request Questions from Beginners MQL5 12 New comment
If it works it's probably ok.
It looks ok so i expect it to work.
Guys, In that script I have function to calculate the Lots, but this is not work for all pairs.
symbol = "EURUSD"
RiskPercent = 2
RiskInPips = 160
Someone can help me with this one?
Guys, In that script I have function to calculate the Lots, but this is not work for all pairs.
symbol = "EURUSD"
RiskPercent = 2
RiskInPips = 160
Someone can help me with this one?
Alain, can you put the link here please?
Alain, can you put the link here please?
You can also just use csv.
I want to send a post request. But i have some question in JSON. the params is
},
};
res=WebRequest("POST", url, headers, 3000, data, result, str);
Can you help me? And how to encode the JSON params to char array?Thank you.