Jump to content

⤴️-Paid Ad- Check advertising disclaimer here. Add your banner here.🔥

Recommended Posts

Posted

hi i another question

 

how to make the AO indicator filter trigger setting user variable?

 

at the moment its set to AO sell only above 0

 

and buy only below 0

 

how would i make it so it can be adjusted in settings in the ea by user ?

 

so i can adjust it to i sell above .00185 and buy below -.00125 or any other setting

 

 

double ao=iAO(NULL,aotimeframe,aoshift);
  
  
  
  
bool aobuy=false;

bool aosell=false;
  
  
 if (aofilter==false || (aofilter && ao<0))  aosell=true;
  
  if (aofilter==false || (aofilter && ao>0)) aobuy=true;

 

 

much thanks

Posted

Re: (ASK)How to add variable to this code

 

Hi zoop,

 

Good day,

 

I believe you want to change the code so it works on different variables.

 

In this case you have the option as well to make this variable controllable from an external function and change it whenever you want.

 

Look here:

 


//on top of the EA, you add external function

extern value_1 = 0.00185;
extern value_2 = -0.00125;
---------------------

double ao=iAO(NULL,aotimeframe,aoshift);
  
     
bool aobuy=false;

bool aosell=false;
  
  
 if (aofilter==false || (aofilter && ao<value_1))  aosell=true;
  
  if (aofilter==false || (aofilter && ao>value_2)) aobuy=true;

 

I hope this is useful.

 

Best wishes,

a New Year 2011 has come, and the challenge has just started 8-)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


⤴️-Paid Ad- Check advertising disclaimer here. Add your banner here.🔥

×
×
  • Create New...