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
It was
When StopLoss is true, the new value is assigned,
otherwise the order is modified.
no error, but you have to take off either a cross or put on trousers).
I didn't get it right away))... the condition might not cause a stop!
Maybe we should just remove else? It seems that logic does not suffer... Why do I need the second condition if only one is enough?
Or so...
see comparison of real numbers.
I will read it... So, is it absolutely necessary? I've just never done it).
I didn't get it right away... The condition might not cause a stop!
Can't we just remove else? Seems like logic does not suffer...
Maybe) 4h candle is usually larger than StopLevel...
I'll read it... I mean, is it really necessary? I've just never done it that way)
all sorts of weird things happen when compared values are almost equal)
when checking a double-type number for equality - mandatory.
In Russian: StopLoss minus Ask is less than StopLevel with accuracy 0.5*Point
(StopLoss,Ask,StopLevel are normalized)
So what about this option? It seems reasonable to keep it...
We should also check the trade context, otherwise we get errors that it is busy - TradeDispatcher: trade context is busy ... It turns out that if there are a lot of copies of the EA, all of them simultaneously close the current order on their symbols and set new ones... a traffic jam will form)
this is probably how it works...
I.e. before closing the current order and setting a new pending order, we check the trade flow... If it's busy, pause for 1 second.
So what about this option? Seems sensible to keep it...
No, it's not. We have to make up our minds.)
three options:
ALex2008 wrote >>
Also, we need to check the trade thread, otherwise it may get errors of being busy... Because if there are many charts, they all close current orders at the same time...if it doesn't help, before all OrderSend,OrderModify,OrderClose,OrderDelete check IsTradeContextBusy()
Only where to place it correctly I think... I mean, for example, the old orders are not deleted because the thread is busy, but the program must place new ones... And the program must only place new ones when all the old orders have been deleted.
rewrite it easier. in the functions UpTrend() and DownTrend() check conditions, orders are removed and put,
too many different things)
No, that's the way it works. >> you got to make up your mind.)
I don't get it, will it or won't it?)
I don't get it - will it work or not?))
*not gonna happen.
In your last variant.
in the first if() StopLoss is not defined.
*not gonna happen.
In your last variant.
in the first if() StopLoss is not defined.
so what is it?
in the first if, the stop takes the minimum (at the price) low of 2 candlesticks... i.e. far from the order
in the second if the stop receives the maximal (at the price) low of 2 candlesticks. i.e. it is close to the order
//здесь StopLoss нипанятно какой)
What exactly is unclear? It is zero when entering the function. Maybe I don't understand something....
Above there is a condition - If order is open and its stop = 0, then place a stop
and the function itself to set a stop