mercredi 11 mars 2015

Anyone can help with this code?

Hi,



If someone could help with this code i would be very appreciated! The part of the code that gives me a lot of errors is this:





if(atrdynamics){

if(signal!=0 && slfactor!=0)stoploss=(atr/pt)*slfactor+slmargin;

if(signal!=0 && tpfactor!=0)takeprofit=(atr/pt)*tpfactor+slmargin;

if(signal!=0 && tstfactor!=0)trailingstart=(atr/pt)*tstfactor;

if(signal!=0 && tsfactor!=0)trailingstop=(atr/pt)*tsfactor;

if(signal!=0 && begfactor!=0)breakevengain=(atr/pt)*begfactor;

if(signal!=0 && befactor!=0)breakeven=(atr/pt)*befactor;

if(signal!=0 && psfactor!=0)pipstep=(atr/pt)*psfactor;

if(signal!=0 && gfactor!=0)gap=(atr/pt)*gfactor;

}

if(highlowdynamics){

if(signal==1 && slfactor!=0)stoploss=((Ask-low)/pt)*slfactor+slmargin;

if(signal==1 && tpfactor!=0)takeprofit=((high-Bid)/pt)*tpfactor;

if(signal==2 && slfactor!=0)stoploss=((high-Bid)/pt)*slfactor+slmargin;

if(signal==2 && tpfactor!=0)takeprofit=((Ask-low)/pt)*tpfactor;

}

if(sdldynamics){

if(signal==1 && slfactor!=0)stoploss=((Ask-Low[sdlbar1])/pt)*slfactor+slmargin;

if(signal==1 && tpfactor!=0)takeprofit=((High[sdlbar2]-Bid)/pt)*tpfactor;

if(signal==2 && slfactor!=0)stoploss=((High[sdlbar2]-Bid)/pt)*slfactor+slmargin;

if(signal==2 && tpfactor!=0)takeprofit=((Ask-Low[sdlbar1])/pt)*tpfactor;

}

if(atrdynamics || highlowdynamics || sdldynamics){

if(stoploss<stoplevel)stoploss=stop level;

if(takeprofit<stoplevel)takeprofit= stoplevel;



On metaeditor it tells me the same thing such as "undeclared identifier". Ill attach a picture.



Thanks in advance.




Attached Thumbnails


Attached Image (click to enlarge)






Anyone can help with this code?

0 commentaires:

Enregistrer un commentaire