[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 137

 
Davit:
Thank you. I'll give it a try.

Perhaps this will work too:

if (Ticket > 0 && !OrderSelect(Ticket, SELECT_BY_TICKET))
{
   OrderSelect(Ticket, SELECT_BY_TICKET, MODE_HISTORY);
   Alert("Инструмент:", OrderSymbol(), ". Ордер ", Ticket, " закрыт!");
   Ticket = 0;
}

But the design suggested earlier is more intelligent.

 
T-G:
I'm not arguing that it will - and I'm not criticising TickSave - it's just that maybe there is a more convenient or better tool, or a new version.
I even have an idea: let the indicator collects ticks in its buffer, and the Expert Advisor takes them from the indicator and processes (I haven't looked at the code and do not know what is wrong with it, but I guess... Although We all are allowed to make mistakes...). The idea is that the indicator will work faster and therefore will miss less ticks. And the Expert Advisor will not affect the skipping in any way. We will have to modify and scold the indicator! :D
 
MaxZ:
Take it and rewrite it yourself. A lot of people will thank you later. Hmm...? :)) Or can't you code? :(
if i'm asking for advice on what's better and more convenient for me it means i need to choose from what's available, probably if i could write i wouldn't ask, what do you think?
 
T-G:
If I appeal to tell me what's better and more convenient to me means I now need to choose from what is, probably if I could write did not ask, what do you think?

One of my guesses, you needed ideas. This thread is for Beginners. Newbie You Know What.

Now that assumption is no longer an assumption! :))


By the way, how many ticks does the EA miss? Preferably give me some statistics. The percentage during a quiet market, during the "movement" ... It's just a question of interest! ;D

 

Good afternoon here is the fruit of my efforts.

Expert. Trading is based on opening trades to one side and increasing lots when losing.

Variables that can be set up when enabling an Expert Advisor.

extern double LotNachalo =0.01; // Initial lot(0.01)

extern double SLA =120; // StopLossAuto for the order being opened (protection)

extern double TPA =120; // TakeProfitAuto for the order being opened (as a safety measure).

extern double SL =70; // StopLoss for the Expert Advisor.

extern double TP =70; // TakeProfit for the Expert Advisor.

extern bool Nap = true; // Trade direction Buy(true)or Sell(false)

extern bool Sys = true; // System message on, off.

extern double K =3; // Lots increase coefficient.


It will be interesting to hear suggestions for improvement.
Files:
 
Davit:

I do it that way, but when the deal is closed, how should I display a message, for example

the transaction number in such and such a tool is closed?

http://www.kimiv.ru/index.php?option=com_remository&Itemid=13&func=fileinfo&id=36 it's time to attach the link.
 
Can you give me a hint? There is a specific system in place. I have decided to automate it! When an order is open, after the price has passed a certain step, another order is opened according to the condition. I have done it, but it opens a heap of orders (((( How should I make only one order be opened after the price has passed a certain step, and not a heap?
 
Falmera:
Can you give me a hint? I have a certain system. I have decided to automate it! When an order is open, after the price has passed a certain step, another order is opened by a certain condition. I did it, but it opens a heap of orders (((( How should I make only one order be opened after a step has been passed, and not a heap?

I told you... Isn't that a solution to your problem?

A checkbox is some variable (e.g. bool). If False, we open the order and set the checkbox to True. And we will not open a second order using the same trading criterion or a combination of them. When the next trade criterion or a combination of them triggers, we set the flag to False. You can give any name to the checkbox, for example:

bool Mne_nuzhen_tolko_odin_order;
 
MaxZ:
You're getting a warning from the Moderator! I told you... Isn't that a solution to your problem?

Where is the solution to my problem?
 
Can you show me an example? true False doesn't mean anything to me
Reason: