KARAUL!!! HELP. 4 hours and 45 minutes to go!!! - page 5

 
fyords:
Reduce the lot below 5.00.
and stop the ekspert if there are no coins
 
At the beginning of OpenLong insert:
 double marg;
 OrderCalcMargin(ORDER_TYPE_BUY, _Symbol, 1, Ask, marg);
 if (volume >= AccountInfoDouble(ACCOUNT_FREEMARGIN) / marg) volume = NormalizeDouble(AccountInfoDouble(ACCOUNT_FREEMARGIN) / marg - 0.1, 1);
if (volume < 0.1) return(-1);

Insert at the beginning of OpenShort:

 double marg;
 OrderCalcMargin(ORDER_TYPE_SELL, _Symbol, 1, Bid, marg);
 if (volume >= AccountInfoDouble(ACCOUNT_FREEMARGIN) / marg) volume = NormalizeDouble(AccountInfoDouble(ACCOUNT_FREEMARGIN) / marg - 0.1, 1);
if (volume < 0.1) return(-1);
 
notused:

Stupid advice two hours before the end - figuring out the standard library is harder than figuring out OrderSend.

The error has already been fixed. All that's left to do is send it in (if there are no other errors).

The point is not the advice. The point is to understand the language you are writing in. If you don't grasp the essence of object orientation, there's no sense in rushing around. Personally, six months ago I prepared the entire base for an EA. Based on a standard library. There's nothing complicated there... You just need to take advantage of it, that's all.

And write your own handlers to send orders, etc ... don't bother ... everything is there.

You have to learn to love the rake)

 
IceBerg:

And write your own handlers to send the order, etc........ everything is there.

I usually laugh out loud at this point (because there's no reason to use sub-optimal (in terms of speed) standard library - time is money (if you use cloud)). In general - general things are always worse than particular things.
Документация по MQL5: Стандартная библиотека
Документация по MQL5: Стандартная библиотека
  • www.mql5.com
Стандартная библиотека - Документация по MQL5
 
notused:
Insert at the beginning of OpenLong:

Insert at the beginning of OpenShort:

Thank you!

I think it worked!

 
notused:
I usually laugh out loud at this point (for using a sub-optimal (in terms of speed) standard library is unnecessary - time is money (if using the cloud)). In general - general things are always worse than specific things.
Actually, the speed issue goes into the background and here's why. In SB, all the classes are structured and have their own error checks. Why go by the cathetuses when you can go by the hypotenuse. Speed is needed... as the saying goes. What is important is the IDEA! on the basis of which the TS is built... go to the LCI then, speed is more important there, if you have an HFT bot... But the most important thing... is to inform the dealing server about your desire to make a deal, and it will take at least 5 minutes to execute... If you have three months of competition ahead of you...
 
IceBerg:
In fact, the issue of speed takes a back seat, and here's why. In SB, all classes are structured and have their own error checks. Why go by the cathetuses when you can go by the hypotenuse. Speed is needed... as the saying goes. What is important is the IDEA! on the basis of which the TS is built... go to the LCI then, speed is more important there, if you have an HFT bot... But the most important thing... is to inform the dealing server about your desire to make a deal, and it will take at least 5 minutes to execute... If you have 3 months of competition ahead of you...
Bring the full code with the standard library (can not do it myself because I can not specialize in the standard library) - buy 1 lot of the current symbol with a stop of 100 pips, take - 200, and slippage of 10 pips.
Документация по MQL5: Стандартная библиотека
Документация по MQL5: Стандартная библиотека
  • www.mql5.com
Стандартная библиотека - Документация по MQL5
 
notused:
Please provide me the complete code with the standard library (I cannot do it myself as I am not a specialist in the standard library) - buy 1 lot of the current symbol with a stop of 100 pips, take - 200 pips, and slippage of 10 pips.

1. Inherit Signal.

2. In the body of "signaler".

int MySignal::LongCondition()

int signal=0;

if (!signalLong==0)
{
signal=100;
}
return(signal);

3. In the Expert Advisor

#include <Expert\Expert.mqh>.

input double Signal_PriceLevel =10.0; // Price level to execute a dealn

input double Signal_StopLevel =100.0; // Stop Loss level (in points)
input double Signal_TakeLevel =200.0; // Take Profit level (in points)

all)

 
IceBerg:

1. Inherit Signal.

2. In the body of "signaler".

int MySignal::LongCondition()

int signal=0;

if (!signalLong==0)
{
signal=100;
}
return(signal);

3. In the Expert Advisor

#include <Expert\Expert.mqh>.

input double Signal_PriceLevel =10.0; // Price level to execute a deal

all)

I asked for full code on how to open a single lot with a take and a stop with slippage (without linking to the first post of this thread) using a standard bibliography (a script can be used)
 
notused:
I asked for complete code on how to open a single lot with a take and a stop with slippage (without linking to the first post of this thread) using a standard library (a script is possible)

Friendship is friendship, but tobacco is apart... The full code will be for this one:

notused:

give full code with standard library (can't do it myself as I'm no expert in standard library) ...

--

not for the good, but for the bad... ...because you will lose your grasp of reality... learn OOP.

At this point I consider the question closed.

Reason: