[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 416

 
Ekburg:
You think I was being disrespectful? I didn't write "hey, you're talking nonsense" in swear words, I said it in a completely respectful manner, using the word "you" and the content of my comment was completely respectful. If you, however, what you did not like - it happens, everyone, always, what is not to like, but if so thinks the person to whom the comment was addressed, let him forgive me, because I did not want to offend anyone or. I also thanked him for the fact that he at least tried to help me! Isn't that respect?

: )))))))) (no lecture... and no comment)

Of the two, the questioner and the answerer, it is more likely that you, the questioner, don't quite understand what happens to the pending orders when they are triggered. A pending order is executed at ANY price closest to it. The rule of thumb for a pending order is if the price has reached it, the trade will go into the market. And the price will not matter. This applies to Stop Losses as well, as they are also pending orders, only the opposite position of the trade itself. This is slightly different to trades on the exchange. Perhaps that's why you have the confusion.

In this sense a lot depends on the quality of the broker. By that we mean both the regulations for executing trades, and the availability of liquidity at that broker, and perhaps a bunch of other features: presumably honesty, etc... If you read the contract with almost any forex broker (DC), it turns out that your transaction (and any other trader) can close at any convenient price of this "broker" and it will be within the law and the regulations, because you have signed it. - But those are other topics. It has nothing to do with programming.

 
Can you tell me if there is such a script: I need to find a bar on the chart for a certain date. You don't have to search for it manually with a mouse or a keyboard, but just type it into the script?
 

I can't figure out how to write to the file
the problem is that this code writes only the last record to the file (as I understand it constantly erases what was written)
how to make the data is written one by one and does not erase the previous records in the file

for (int i=NumberOfCandels; i>0; i--) {
    arrowbuy = iCustom(NULL, 0, "xxx", 0, i);
    arrowsell = iCustom(NULL, 0, "xxx", 1, i);
    
    if(arrowbuy != EMPTY_VALUE && arrowsell == EMPTY_VALUE) {
      //Print(TimeToStr(Time[i], TIME_DATE|TIME_MINUTES), " Buy");
      handle=FileOpen("AUDJPY.csv", FILE_READ|FILE_WRITE, '\t');
      if(handle>0) {
        FileWrite(handle, TimeToStr(Time[i], TIME_DATE|TIME_MINUTES), " Buy");
        FileClose(handle);
        }
      }
    if(arrowsell != EMPTY_VALUE && arrowbuy == EMPTY_VALUE) {
      //Print(TimeToStr(Time[i], TIME_DATE|TIME_MINUTES), " Sell");
      handle=FileOpen("AUDJPY.csv", FILE_READ|FILE_WRITE, '\t');
      if(handle>0) {
        FileWrite(handle, TimeToStr(Time[i], TIME_DATE|TIME_MINUTES), " Sell");
        FileClose(handle);
        }
      }
  }
 
okvseok:
Can you tell me if there is such a script: I need to find a bar on the chart for a certain date. You don't have to search for it manually with a mouse or a keyboard, but just type it into the script?
If you yourself understand the question (understand what you're asking), could you please reformulate or clarify it? I, for example, did not understand what not to search for and in which script to enter.
 

or in other words you can say
the script is supposed to roughly write n number of lines, but it only writes one

 
Run:

or in other words
the script is supposed to roughly write n number of lines, but it only writes one

Close the file somewhere else. And opening, but in a different place.
 
Chiripaha:
If you yourself understand the question (understood what you asked), then do not mind to reword or clarify it? Because I, for example, did not understand what not to look for and in which script to enter.


Now I will try an example)))

I have a set of 5 min Euro/Dollar bars in front of me for the date 2012.06.07. And I need, for example, to find one 5 min bar for 2004.05.03.... Is there any way to search for this bar not manually?

 
okvseok:


Let me try an example)))

I have a set of 5 min Euro/Dollar bars in front of me for the date 2012.06.07. And I need, for example, to find one 5 min bar for 2004.05.03.... Is there any way to search for this bar not manually?

There is, but for that you must at least define what "not manually" means.
 
tara:
There is, but for that you have to at least define what "not manually" means.


well, for example, not to spin the mouse wheel (key) for 3 minutes left or right))), but just to enter a certain bar date or something else.

Thanks for the answer!

 
okvseok:


well, for example, not to spin the mouse wheel (key) for 3 minutes left or right))), but simply to enter a specific bar date or something else.

In the lower left corner of the chart (where the date is), double-click the mouse and in the window that opens, enter the desired date in the format DD.MM.YYYY - is this "not manual" option ok?