- Neue Funktionen
Function of the correct decrease in the volume of the deals
Everybody checks the availability of a sufficient amount of margin - this is a mandatory requirement of the Market.
But the trader does not benefit from this.
The deal will not open if at least 1 cent of the margin is not enough. It doesn't matter who refuses, terminal or robot.
This is dangerous. If the trader is not able to constantly be near the computer, then any such refusal can lead to the loss of the deposit.
The lock-deal did not open on time and the margin went into negative - you can't open more anything.
The account can only be saved through large losses or a large increace deposit.
I have been using a different method of controlling the volume of a trade for many years.
This function Calculates an affordable deal-volume.
It reduces the initial deal-volume to 90% of the maximum possible.
#import "VolumeReduct.ex4" double VolumeReduct(int type=0, double lot=0); #importAn example of a function call:
BuyLot = VolumeReduct(OP_BUY,BuyLot);
The function prints messages about the initial and recalculated trade volumes to the log (see screenshot).If you need to build this function into a robot intended for sale in the Market - write, we will solve this issue.