[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 177

 
Reaktiv:


I figured it out on my own. But I still don't understand your last tip. Is it possible to pull all the orders and see which one was later by time? You mean, you want to pull all orders and compare the closing times of all orders? Show me the code how to do it.

I solved it this way:

int z;
int _bar;

int start()

{

z=OrdersHistoryTotal()-1;
OrderSelect(z,SELECT_BY_POS,MODE_HISTORY);
if(TimeCurrent() - OrderCloseTime() > 1& TimeCurrent() - OrderCloseTime() < 7)
{
if(OrderProfit()> 0)
PlaySound("profit.wav");
if(OrderProfit()== 0)
PlaySound("zero.wav");
if(OrderProfit()< 0)
PlaySound("loss.wav");
}

It turns out that if 1 is substituted for z, the most recent order will be selected, which is logical, so I have taken OrdersHistoryTotal() (it returns the number of orders in the history) and used it instead of the index. However, it turns out that OrdersHistoryTotal() returns 1 more than it actually is. My history has had 6 orders, but OrdersHistoryTotal() returns 7 orders. Therefore, I wrote z=OrdersHistoryTotal()-1;. But I didn't know before what to use in the index to select the last one. I had to figure it out on my own because no one told me anything.

You need to know how to use the search - there is a lot of information from Kimiv on the website -
Files:
 
todem:
you have to know how to use the search engine
Such an ability is rare because one lacks understanding of the essence of one's own goals and self. therefore a depth of self-awareness - a spiritual quality - comes into play. and spirituality is absent today because almost everything around us destroys us in all aspects
 
eddy:
Such an ability is rare because there is no understanding of the essence of one's own goals, i.e. oneself. i.e. the depth of selfawareness - a spiritual quality - plays a role here. and spirituality is absent today, because nowadays almost everything around us destroys us in all plans.

that's a good one
 
I need an indicator that shows the entered information on all charts to which it is attached. For example, I select "AUDUSD - up, GBPUSD - down, etc." and the NZDUSD chart (where the indicator is located) is automatically updated in real time as icons or text. Is it possible to implement such an action and in what direction should I start looking?
 
eddy:
why? you can just lose 1 time at the close of the order

Can you please show me how?
 
bool proigrano;
if (!proigrano) Alert();
 
unnnamed:
I need an indicator to show the entered information on all charts to which it is attached. For example, I select "AUDUSD - up, GBPUSD - down, etc." and the NZDUSD chart (where the indicator is located) is automatically updated in real time as icons or text. Is it possible to implement such an action and in what direction should I start looking?

i want to know more about it!
 
unnnamed:
Need an indicator to show the input information on all charts
https://www.mql5.com/ru/code/9059
 

 

Thanks Eddie, but that's not it. Reread my post, realised it was misleading. I've attached a picture and there's a more detailed description.