Strategic foresight systems - page 2

 

More precisely, the code is like this:

      double AUDJPY=(iHigh("AUDJPY", PERIOD_D1, window-n-1)+iLow("AUDJPY", PERIOD_D1, window-n-1))/2.0;
      double AUDUSD=(iHigh("AUDUSD", PERIOD_D1, window-n-1)+iLow("AUDUSD", PERIOD_D1, window-n-1))/2.0;
      double CHFJPY=(iHigh("CHFJPY", PERIOD_D1, window-n-1)+iLow("CHFJPY", PERIOD_D1, window-n-1))/2.0;
      double EURCHF=(iHigh("EURCHF", PERIOD_D1, window-n-1)+iLow("EURCHF", PERIOD_D1, window-n-1))/2.0;
      double EURGBP=(iHigh("EURGBP", PERIOD_D1, window-n-1)+iLow("EURGBP", PERIOD_D1, window-n-1))/2.0;
      double EURJPY=(iHigh("EURJPY", PERIOD_D1, window-n-1)+iLow("EURJPY", PERIOD_D1, window-n-1))/2.0;
      double EURUSD=(iHigh("EURUSD", PERIOD_D1, window-n-1)+iLow("EURUSD", PERIOD_D1, window-n-1))/2.0;
      double GBPCHF=(iHigh("GBPCHF", PERIOD_D1, window-n-1)+iLow("GBPCHF", PERIOD_D1, window-n-1))/2.0;
      double GBPJPY=(iHigh("GBPJPY", PERIOD_D1, window-n-1)+iLow("GBPJPY", PERIOD_D1, window-n-1))/2.0;
      double GBPUSD=(iHigh("GBPUSD", PERIOD_D1, window-n-1)+iLow("GBPUSD", PERIOD_D1, window-n-1))/2.0;
      double NZDUSD=(iHigh("NZDUSD", PERIOD_D1, window-n-1)+iLow("NZDUSD", PERIOD_D1, window-n-1))/2.0;
      double USDCAD=(iHigh("USDCAD", PERIOD_D1, window-n-1)+iLow("USDCAD", PERIOD_D1, window-n-1))/2.0;
      double USDCHF=(iHigh("USDCHF", PERIOD_D1, window-n-1)+iLow("USDCHF", PERIOD_D1, window-n-1))/2.0;
      double USDJPY=(iHigh("USDJPY", PERIOD_D1, window-n-1)+iLow("USDJPY", PERIOD_D1, window-n-1))/2.0;  

I just decided to collect the whole load in one script and flip the row at once. I've been caught by my absent-mindedness a few times already.

 
granit77:
Oh, come on! We're more interested to see how you argue about business than when you argue. Be patient for the cause.

Then I went to get a bazooka (just in case)

:о)

 
Farnsworth:

Then I went to get a bazooka (just in case)

:о)

I'm there too... on my way...
 
Farnsworth:

Sampling is from zero, but how can I make it so that 290 bars are selected, but only for finally formed bars? I can't figure it out.

for(n=0; n<=window-1; n++)

Perhaps, this may cause some problems with history loading, since automatic loading of history only on open charts should be taken into account or all necessary charts should be opened
.

Farnsworth:

More precisely, the code is like this:

In this code it would probably be easier for you to "flip" it like this:

for(n=window-1; n>0; n--)
otherwise you're sure to get confused
 

Saw somewhere here the prerequisites for a multi-currency player.

Could have helped you, Farnsworth - if I had found it :(. But I remember that there were comments of developers themselves. Who can find it - throw the link here, please.

 
IgorM:

There might be problems with history paging, since the history auto-paging only goes on open charts, you might want to take this into account or keep all necessary charts open

It would probably be easier for you to "flip" the code like this:

otherwise you will get confused

Yes, I will have to keep open quotes, but it's not a problem. I will try to work on the code some more. I have to organise this mess somehow.
 
Mathemat:

Saw somewhere here the prerequisites for a multi-currency player.

Could have helped you, Farnsworth - if I had found it :(. But I remember that there were comments of developers themselves. Who found it - throw the link here, please.


Hi Alexey. I don't have a multi-currency. Bayesian logic does not look at adjacent quotes. Making trading decisions has nothing to do with them. I only want to try, and then in the "back ground" to look at the correlation of some foundation parameters. I will start doing it in a couple of weeks. Right now I want to test the minimum block.

to Svinozavr

I am there too... on the way ...

It's a dialectic :o)

 
Farnsworth:
I'll try to work on the code some more.

I guess that's the way it should be:

//+------------------------------------------------------------------+
//|                                                   Farnsworth.mq4 |
//|                      Copyright © 2011, MetaQuotes Software Corp. |
//|                               https://www.mql5.com/ru/users/igorm |
//+------------------------------------------------------------------+
#property copyright "IgorM"
#property link      "https://www.mql5.com/ru/users/igorm"

extern int window=290;

string sym[14]={"AUDJPY","AUDUSD","CHFJPY","EURCHF","EURGBP","EURJPY",
                "EURUSD","GBPCHF","GBPJPY","GBPUSD","NZDUSD","USDCAD","USDCHF","USDJPY"};

int start(){
   int i, n;
   int Handle;
   double HL[14];
   string FileName="quatation.csv";
   Handle=FileOpen(FileName, FILE_CSV|FILE_WRITE," ");
   if(Handle==-1){
      Alert("");
      return(-1);
   }
   FileWrite(Handle, sym[0], sym[1], sym[2], sym[3], sym[4], sym[5], sym[6], sym[7], sym[8], sym[9], sym[10], sym[11], sym[12], sym[13]);
   for(n=window-1; n>0; n--){
      for(i=0;i<14;i++)
                   HL[i] =(iHigh(sym[i], PERIOD_D1, n)+iLow(sym[i], PERIOD_D1, n))/2.0;
      FileWrite(Handle, HL[0],HL[1], HL[2], HL[3], HL[4], HL[5], HL[6], HL[7], HL[8], HL[9], HL[10], HL[11], HL[12], HL[13]);
   }
   FileClose(Handle);
return(0);
}
//___________________________________________________________________________________________
 
IgorM:

that's probably the right thing to do:


Right, that's much better. I'm a lousy programmer.
 
Farnsworth: Bayesian logic doesn't look at neighbouring quotes.

That's interesting. Do you have any references?

I've just been messing around with independence checks myself lately, i.e. not that far from Bayesian. And so far too on a single pair.

Reason: