1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
//.
//>F77E.ArbitrageCandidat()
// Pour reprendre l'exemple A,B,C; considérons qu'il y a 3 candidats sélectionnés pour le trading=aiNbreCandidat, et seulement 2 places disponibles=aiPlaceDispo.
// CI-DESSOUS listes des Variables renseignées par fonctions précédentes
//atb.CandidSetUp[i][s][t] = Boolean , si oui ou non, le Symbol du Forex [i] dans le contexte [s][t] a été validé "prêt à lancer un trade".
//aiNbreCandidat = entier , nombre de candidats au trade ;
//aiPlaceDispo = entier , nombre de trades possible en fonction parametres initiaux;
//atd.RRCandid[i][s][t] = décimale, valeur d'un ratio risk Reward;
void F77E.ArbitrageCandidat()
{//a
int ati.BestRR[][qi.SetUp][2]; ArrayResize(ati.BestRR,aqi.SB);ArrayInitialize(ati.BestRR,0); //ati.BestRR : entier, pour cumul point chaque meilleur RR
for(int i=0;i<aqi.SB;i++) //aqi.SB =nombre Symbol listé
{//b
for(int j=0;j<aqi.SB;j++)
{//c
for(int s=0;s<qi.SetUp;s++) //qi.SetUp = nombre de SetUp testé
{//d
for(int t=0;t<2;t++)
{//e
if(atb.CandidSetUp[i][s][t]==true && atb.CandidSetUp[j][s][t]=true)// chaque fois qu'un Symbol i & j sont candidats
{//f
if(atd.RRCandid[i][s][t]>atd.RRCandid[j][s][t] ) // si le ratio de i est supérieur à celui de j
{//g
ati.BestRR[i][s][t]++; //son cumul de point est incrémenté de 1
}//gz
}//fz
}//ez
}//dz
}//cz
}//bz
for(i=0;i<aqi.SB;i++)
{//h
for(s=0;s<qi.SetUp;s++)
{//i
for(t=0;t<2;t++)
{//j
for(int x=1;x<=aiPlaceDispo;x++)
{//k
if(ati.BestRR[i][s][t] ==aiNbreCandidat-x) {Alert("le ",x,sp,"est: ",ats.SB[i],sp,"avec: " atd.RRCandid[i][s][t]);}//sp pour space
}//kz
}//jz
}//iz
}//hz
if(Fbug==1){F04_Bug("F77E.ArbitrageCandidat");}
}//az
//<\_END_F77E.ArbitrageCandidat()__________________________________________________________________________________________________________________________________________________ |
Partager