Please tell me. The Expert Advisor trades based on indicator signals on every bar. What should I do to have conditions checked on every tick. Here are the conditions in the indicator :
int limit, i; int counted_bars=IndicatorCounted(); // How many bars have already been counted if (counted_bars<0) return(-1); // Check possible error if (counted_bars>0) counted_bars--; // count the last counted bar limit=Bars-counted_bars; // Start from the last counted bar // - 1 - ============================ End of block ===================================
There is a second function in the same advisor. Everything is fine there. (ObjectSet(objName, OBJPROP_ARROWCODE, 1);)
You think I'm going to convince you that you misunderstand something? You'd better spend your time on experiments and trying to understand what you've written.
Can you tell me what condition to add before OrderSend, so that the order is not executed if the previous open position is in deficit? So that there is no averaging.
Can you tell me what condition to add before OrderSend, so that the order is not executed if the previous open position is in deficit? I want to avoid averaging.
Good evening, could you please tell me how the EA works. If I write return directly in the main function Start, does the EA terminate? Thanks in advance!
Grossmester: Good evening, could you please tell me how the EA works. If I write return directly in the main function Start, does the EA terminate? Thanks in advance!
It only works until the next tick. And then it starts again.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Read it carefully. I don't remember in detail, but code 3 is not part of Wingdings.
ps; Here is what is in the note
The special arrow codes cannot be used in the arrow display when setting the arrow value for linesthat have a DRAW_ARROW style.
This is an EA and it has a function.
It's the councillor.
It doesn't matter.
When can I do it?
This is the Expert Advisor.
There is a second function in the same advisor. Everything is fine there. (ObjectSet(objName, OBJPROP_ARROWCODE, 1);)
int counted_bars=IndicatorCounted(); // How many bars have already been counted
if (counted_bars<0) return(-1); // Check possible error
if (counted_bars>0) counted_bars--; // count the last counted bar
limit=Bars-counted_bars; // Start from the last counted bar
// - 1 - ============================ End of block ===================================
// - 2 - ======================= Display indicator on history ======================
for(i = limit; i >= 0; i--)
{
FastMA= iMA(NULL, 0, FastMAPeriod, FastMAShift, FastMAMethod, FastMAPrice, i);
SlowMA= iMA(NULL, 0, SlowMAPeriod, SlowMAShift, SlowMAMethod, SlowMAPrice, i);
}
// - 2 - ============================ End of block ===================================
// - 3 - ======================= Signal output ========================================
//if (LastBar != Time[0]) // once per bar
//{
is this it?
There is a second function in the same advisor. Everything is fine there. (ObjectSet(objName, OBJPROP_ARROWCODE, 1);)
Good afternoon, all.
Can you tell me what condition to add before OrderSend, so that the order is not executed if the previous open position is in deficit? So that there is no averaging.
Good afternoon, all.
Can you tell me what condition to add before OrderSend, so that the order is not executed if the previous open position is in deficit? I want to avoid averaging.
In general, the check goes like this
OrderSelect(ticket,SELECT_BY_TICKET);
if(OrderProfit()<0) { }
And you can put anything you like in brackets. I, for example, use it this way to make the "Martin" method work)
Good evening, could you please tell me how the EA works. If I write return directly in the main function Start, does the EA terminate? Thanks in advance!