[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 256

 

I must have misspoken. I need the order to be created at a distance from the horizontal level. For example, like this:

Ask=1.35684 An order was opened at 1.35700, TP=1 .35800,SL=1.35600

Ask=1.35681 Nothing happens to the orders

Ask=1.35692 Nothing happens with the orders

Ask=1.35699 Nothing happens with the orders

Ask=1.35715 Order opens with the price 1.35800, TP=1 .35900,SL=1.35700

Ask=1.35757 Nothing happens with the orders

Ask=1.35791 Nothing happens with the orders

Ask=1.35802 Order opened with price 1.35900, TP=1 .36000,SL=1.35800

 

Please help me to understand how to use indicator for USDJPY and EURUSD. Using the Comment function I can display two values in the left corner (a1 and a2). I want to ask how to make indicator could work with these two values (from each pair) not manually enter them into Excel for further calculations.

 
Alexandr24 >> :

I want to know how to use indicator for USDJPY and EURUSD. I want to use Comment function and display two values in left hand corner (a1 and a2), I want to change indicator's functionality and not to manually input these two values into Excel for further calculations.

Instead of the comment we write any necessary calculations. This is not an empty line in the comment; we have to find the variables to be printed.

If the issue of getting indicator values from different currency pairs is of interest, then iCustom is of help, there are also iClose, iOpen, etc.

 

Why does it work like this (arrows are drawn)

   double muv_h4= norm(iMA(Symbol(),PERIOD_H4, muv_trend_per,0,MODE_EMA,PRICE_CLOSE,0));
   double sar_h4= norm(iSAR(Symbol(),PERIOD_H4, hag_parab, max_parab,0));
   int vol_0_h4=iVolume(Symbol(),PERIOD_H4,0);
   int vol_1_h4=iVolume(Symbol(),PERIOD_H4,1);
   int procent_h4= vol_0_h4/ vol_1_h4;
   if( muv_h4<iOpen(Symbol(),PERIOD_H4,0) && sar_h4<iOpen(Symbol(),PERIOD_H4,0) /*&& procent_h4>2.0*/)
      {
      ObjectCreate("arrow"+Time[0],OBJ_ARROW,0,Time[0], sar_h4);
      ObjectSet("arrow"+Time[0], OBJPROP_ARROWCODE,241);
      ObjectSet("arrow"+Time[0], OBJPROP_COLOR,Green);
      h4_byk=true;
      }

but when I uncomment the volumes, it does not work (nothing is drawn, although the condition is fulfilled when I view it manually)

   double muv_h4= norm(iMA(Symbol(),PERIOD_H4, muv_trend_per,0,MODE_EMA,PRICE_CLOSE,0));
   double sar_h4= norm(iSAR(Symbol(),PERIOD_H4, hag_parab, max_parab,0));
   int vol_0_h4=iVolume(Symbol(),PERIOD_H4,0);
   int vol_1_h4=iVolume(Symbol(),PERIOD_H4,1);
   int procent_h4= vol_0_h4/ vol_1_h4;
   if( muv_h4<iOpen(Symbol(),PERIOD_H4,0) && sar_h4<iOpen(Symbol(),PERIOD_H4,0) && procent_h4>2.0)
      {
      ObjectCreate("arrow"+Time[0],OBJ_ARROW,0,Time[0], sar_h4);
      ObjectSet("arrow"+Time[0], OBJPROP_ARROWCODE,241);
      ObjectSet("arrow"+Time[0], OBJPROP_COLOR,Green);
      h4_byk=true;
      }

 
evgenio писал(а) >>

Why does it work like this (arrows are drawn)

but when I uncomment the volumes, it doesn't work (nothing is drawn, although the condition is fulfilled when I view it manually)

double procent_h4=vol_0_h4/vol_1_h4;

 
DC2008 >> :

double procent_h4=vol_0_h4/vol_1_h4;

+1 cps

 

Hello! In order to calculate the total profit from a certain date (date of opening an order with magic 111) I used the KimIV:

GetProfitFromDateInCurrency(NULL, -1, -1, (TimeOpenLastPos(NULL, -1, 111))

But the result is always zero. I don't understand what I've done wrong. Help me, please!

 
splxgf >> :

Any calculations you want are written instead of a comment. It's not the empty string that's output in the comment, you need to find out which variables are output.

If you are interested in getting the indicator values from different currency pairs, iCustom is a help, there is also iClose, iOpen, etc.

a1=..........

a2=..........

b1=iCustom("USDJPY",0, "Indicator1",
b2=iCustom("USDJPY",0, "Indicator1",
c1=iCustom("EURUSD",0, "Indicator1",
c2=iCustom("EURUSD",0, "Indicator1",

here's how to relate a1 and b1, a2 and b2, a1 and c1, a2 and c2.

I thought about doing it this way but nothing works, although a1[i] and a2[i] if I output them via Comment show true values as they should be.

double b1=iCustom("USDJPY",0, "Indicator1",a1[i],0,1);
double b2=iCustom("USDJPY",0, "Indicator1",a2[i],1,1);
double c1=iCustom("EURUSD",0, "Indicator1",a1[i],0,1);
double c2=iCustom("EURUSD",0, "Indicator1",a2[i],1,1);

but how can I get the values of a1 and a2 calculated according to the formula from two currency pairs?

 

There is a problem. I have calculated support and resistance levels in XL. Is there any way to transfer this data to MT4 as a bar? I did the search only the other way round.

It is a long time by hand and not by one pair.

 
Slepoy >> :

There is a problem. I have calculated support and resistance levels in XL. Is there any way to transfer this data to MT4 as a bar? Searching only the other way round.

By hand is long . and not one pair at a time.

Try to save the file in csv-format and use standard functions to read csv-files in the terminal...