Trade101 multi-currency indicator - page 4

 
Does anyone know how to reduce items to a common denominator and do as described by the author? I feel that I need to dig in MarketInfo, but I don't know which parameter.
 
Hmm, I'm still getting zero divide. It's a bit of a mystery.
 

Zero divide only when MarketInfo(Pair[j], MODE_POINT)=0.

This shouldn't happen... Is history loaded on all pairs? Try to open all 14 pairs in the terminal.

 
Maybe it's because my CHFJPY is gray only. (Trading on it is forbidden) But the quotes go. Maybe the indicator can't pull the markitonfo from there? Although another indicator is working fine with this symbol.
 
If you can, script that marketinfo to Print for all currencies. That should clear it up...
 
Unfortunately, I'm not very good at programming. :(
 

I wonder why, if you leave only 2 pairs, e.g. Pair[0]="EURUSD"; Pair[1]="GBPJPY";

it does not work ???

Who knows, doesn't say; who says, doesn't know. A stockbroker's rule of thumb
 
sergeev писал(а) >>

I'll ask again. Are you sure that the block:

b=true;
while ( b) // сортируем массив по возрастанию
{
b=false;
for ( j=1; j< Max; j++)
  if ( Price[ j]< Price[ j-1]) 
  { 
   a= Price[ j]; Price[ j]= Price[ j-1]; Price[ j-1]= a;
   n= Num[ j]; Num[ j]= Num[ j-1]; Num[ j-1]= n; b=true; 
  }
}

Sorts the Price[] array correctly?

Or did I miss one more loop somewhere? ;)

Or it (block) has another purpose?

 

I don't know if it would help. I first take the EURUSD (most quotes, I think) time interval, e.g. 1 hour. And then the rest of the symbols are the interval via iBarShift.

Then for each symbol I calculate not the movement in points, but points multiplied by their price (at 1.0 lot).

      for(int j=0; j<14; j++)
      {
         int q;
         if(j<7) q=-1; else q=1;
         string sm=smbl[j];
         int ii=iBarShift(sm,PERIOD_M1,timenow);
         int jj=iBarShift(sm,PERIOD_M1,timestart);
         double p;
         if(StringFind(sm,"JPY")>=0) p=0.01; else p=0.0001;
         double sp=MarketInfo(sm,MODE_SPREAD);
         double pp=MarketInfo(Symbol(), MODE_TICKVALUE);
         double mv=((iClose(sm,PERIOD_M1,ii)-iClose(sm,PERIOD_M1,jj))/p*q-sp)*pp;
         smbl_movement[j]=mv;
         if(j<7) sumsell=sumsell+smbl_movement[j];
         else sumbuy=sumbuy+smbl_movement[j];
      }
      GreenBuffer[i]=sumbuy;
      RedBuffer[i]=sumsell;

And I take two buffers - the total profit of seven points in buy and seven points in sell (green and red symbols in T101)

I want to add more buffers - H4 and daily intervals.

And in general, gentlemen, not to bury all over the world - who is interested, go to the site of Victor (vinin) - there have been a lot of chatter and bargaining has gone a little, maybe something will be added.

And sorting, by the way, already worked out (see Comment() )

 
SergNF >> :

I'll ask again. Are you sure that the block:

Sorts the Price[] array correctly?

Or did I miss one more loop somewhere? ;)

Or it (the block) has another purpose?

Yes, it is.

Do I have an error there that I can't see?