[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 295

 

Hello again, apparently my question was not noticed, so once again I ask for a reply to my message of 10.11.09 10:38.

I would also be grateful for an example of an Expert Advisor, in which when an order is closed a reverse order is immediately opened. I think I can modify it to suit my needs.



I am asking for feedback, with respect to local pros =)

 

Right off the bat - I'm a beginner - and I think such things have been invented a long time ago.

I would like to place an order with a set difference from the current price and preset stoploss and takeprofit.

Help who can - I'm sure such things have been invented a long time ago to make life easier.

I.e. I always do standard buy/sell orders (like this - buy/sell order 30 pips from current price, SL and TP - 50 and 60 pips from transaction price) - would like to cram less numbers.

Or tell me where you can find a ready-made one or who can write one?

Good luck to all!!!

 

Below Example of an Indicator part in which, when compiling other (unrelated Indicators)

value of an external variable is zeroed - in MT we change Show_Working_Hours to true, and after

and after compiling something in indicator properties false appears again.

Question, what is the best way to avoid it?


#property indicator_chart_window

extern bool   Show_Working_Hours = false;

int start() {
// ``````````````````````````````````````````````````````````````````````````````````````````````````````````````
if( Show_Working_Hours==true   &&   Period()<1440) {
   for(int i = Bars-1; i >= 0; i--) {
      . . . 
      
      if( i<=0) {
         break;
      }
   } // for(i = Bars-201; i >= 0; i--) {
   
   Show_Working_Hours = false;
} // if(Show_Working_Hours==true   &&   Period()<1440) {
// ```````````````````````````````````````````````````````````````````````````````````````````````````````````````



I.e. after start of indicator I change value

extern bool   Show_Working_Hours       = false;

to "true". Then if I compile another code I find that the value of this variable in Indicator Properties is "false" again.


Thank you!





 
chief2000 >> :

Below Example of an Indicator part in which, when compiling other (unrelated Indicators)

value of an external variable is zeroed - in MT we change Show_Working_Hours to true, and after

and after compiling something in indicator properties false appears again.

Question, what is the best way to avoid it?


I.e. after start of indicator I change value

to "true". Then if I compile another code I find that the value of this variable in Indicator properties is "false" again.


>> Thanks!

This is not the case, you either have the same files or a lot of compilers, put your computer in order and life will get better :o)

ps The old value of this variable in the Indicator Properties after compilation can only be retained in the tester.

 
How to select all orders (OrdresTotal()) for a given EURUSD symbol - for example. Is it possible to set this parameter?
 
oyshen >> :
How to select all orders(OrdresTotal()) by a given EURUSD symbol - for example. Is it possible to set this parameter?

You select through OrdresSeleckt() an order, then check if OrderSymbol()=="EURUSD", then the ticket should be written in the buffer. Then, when you get all orders in the buffer, only those for EURUSD will be selected.

 
oyshen писал(а) >>
Is it possible to set such a parameter?

no

 
Thank you for your promptness !
 
Urain >> :

It doesn't happen, you either have files with the same name or a bunch of compilers, get your computer in order and life will get better :o)

ps The old value of this variable in the Indicator Properties after compilation can only be saved in the tester.

It happens :) I haven't noticed anything like that before too and now it seems to be happening with only one Indicator

(I haven't checked others intentionally). Thought maybe someone had encountered something like this.

 

chief2000 писал(а) >>

...Thought maybe someone had come across something like this....

I have, and more than once. And each time, in the end, a simple reason was found.

Reason: