[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 361

 
drknn:

Add my lot checking function to your custom subroutines. And call it before each OrderSend(). Rounding in my dll is done by the laws of mathematics: If the rounded number ends in fractional part with number >=5, then rounded up. If <=4, then it's rounded down. As far as I understood programming languages have problems with this for some reason - I had to make my own dll-code. Basically, the code is very simple, but I searched the Internet quite a lot at my time, before I found the optimal solution. Do you need the source code of the dll?


Yeah. Thanks.
 
Roman.:

Yes. Thank you.


DLL language: Delphi

library basic;

uses
  SysUtils,Windows,Classes,Dialogs;

{$R *.res}

{Обычно в своих программах не требуется менять модель вызова, delphi по
  умолчанию использует более быстрый fastcall, но при импорте функций из других
  библиотек нужно указывать stdcall (или cdecl для сишных библиотек типа
  msvcrt.dll), иначе просто не будет работать, или будет, но неверно}

// --------- Арифметическое округление до сотых ---------
function OkruglenieDoSotykh(d_ChtoOkruglit:Double):Double; stdcall;
var
  d_Rezult:Double;

begin
  d_Rezult:=Int(d_ChtoOkruglit*100+0.55);
  OkruglenieDoSotykh:=d_Rezult/100;
end;

exports OkruglenieDoSotykh;

begin
end.
 

Basically, I do the following: whenever I have to calculate order's lot, I pass this lot to my lot checking function, and it returns correct lot. As a result, if lot was calculated in a subprogram, then my subprogram ALWAYS returns the correct lot to the main program. With this approach, there's no lot hassle at all. Example:

int start(){
  Lot=FLot();
  return(0);
}
// ---------- Пользовательские подпрограммы ----------
doble FLot(){
double LotOrdera;
  LotOrdera=.....;// тут как-то вычисляем лот
  LotOrdera=ProverkaLota(LotOrdera,Symbol());
  return(LotOrdera);
}
// ---------
double ProverkaLota(double Lots,string SMB){
   // этот код я Вам дал
}
 

I see. Thank you.

Now just on Eurobucks, for example, everything works, on metals - silence... All the parameters are the same.

What the fuck?


 
Roman - congratulations on the Eurobuck, I remember you had a lot of bays there)
 
marker:
Roman - congratulations on the Eurobuck, I remember you had a lot of baits there)

Senk. It was - It's all sorted out and it's back on! :-)


Can not connect to my GRAAL - metals ... :-(

 

On Alpari - code is the same on gold - everything tests - works fine. On 4 - it won't... All parameters are the same. There and there you can open lots from 0.01.


 

Hello, I still can't connect MT4 to my server. Who knows what to do? I´ve contacted support twice, but they only reply with standard phrases: disable firewall, check internet, etc. I'm fine with internet, software has been added to firewall exceptions list. I tried to disable it and antivirus, but no result.
Tried setting server parameters manually.

It keeps showing "No communication" at the bottom. I haven't found an answer to this question on the forum. By the way, my other trading software is working fine. Why is MT4 not connecting, what could be preventing it? Thanks in advance for the help.

 
Roman.:

No use so far... Writes the same error...

I opened a position for gold on my account in the tester with 10,000 and 0.01 and 0.1 lots - to no avail.

Perhaps someone had a similar issue? Can you give me a hint...


What is the minimum acceptable lot?
 
Vinin:

What is the minimum acceptable lot?


0.01 - NDD cent account. TR and SL = 0.

Everything is the same everywhere.

On 4th - on currency pairs - without question everything is tested according to the algorithm.

On Alps - gold - tested according to the algorithm.

I would like to add metals to my GRAAL, which works in 4th, so far only on currencies.

Reason: