
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
What you asked for is something to give to your CEO to get your boss (and you) fired. Doesn't work in SW.
Once you return, your 'boss' is in charge. You can't force your 'boss' to do anything.
What you asked for is something to give to your CEO to get your boss (and you) fired. Doesn't work in SW.
Once you return, your 'boss' is in charge. You can't force your 'boss' to do anything.
Lol.
It is conceivable at least. For example, I could give the CEO spoofed evidence that we are both involved in some questionable activities.We will both be fired.
Anyway,
I worked something out:
I replaced all occurrences of OrderSelect() in start() with
Where, OrderSelectAlert() is defined as follows:
I don't know if this is good design. If ever I become a better, more experienced programmer I might know.
RaptorUK knows I disagree with that. NormalizeDouble is NEVER needed. It's a kludge, don't use it. It's use is always wrong.
Doesn't compile. ls variable should be lotStep?
obviously.
RaptorUK knows I disagree with that. NormalizeDouble is NEVER needed. It's a kludge, don't use it. It's use is always wrong.
Hi William
Hope you can help me to identify the problem in the code. When I normalize the volume, I get 0.0 as normalized volume (highlighted in Red below). Attached is my code.
HS 0 19:22:49.168 Core 1 2021.01.04 08:00:00 InpPrice 0.89563 InpSL 0.89529 InpRPTrade 0.05
EI 0 19:22:49.168 Core 1 2021.01.04 08:00:00 Tick Value (ExRate) 1.36832
IR 0 19:22:49.168 Core 1 2021.01.04 08:00:00 FxCTrade::Get_OptimumVolume: Optimum Lot before Normalization 2.149479
KS 0 19:22:49.168 Core 1 2021.01.04 08:00:00 FxCTrade::Get_OptimumVolume: SL Pips 3.4 SL CDeposit 1.0 SL CQuote 0.730823
PN 0 19:22:49.168 Core 1 2021.01.04 08:00:00 FxCTrade::Get_OptimumVolume: VolumeSTEP 0.01 VolumeMin 0.01 VolumeOptimum 2.149479 Normalize Lot 0.0
double NormalizePrice(double p, string pair=""){ // https://forum.mql4.com/43064#515262 zzuegg reports for non-currency DE30: // MarketInfo(chart.symbol,MODE_TICKSIZE) returns 0.5 // MarketInfo(chart.symbol,MODE_DIGITS) return 1 // Point = 0.1 // Prices to open must be a multiple of ticksize if (pair == "") pair = Symbol(); double ts = MarketInfo(pair, MODE_TICKSIZE) return( MathRound(p/ts) * ts );
Seeing this coded out makes so much sense now. Thank you for this William! I have been fighting this very issue!