zoop Posted January 29, 2010 Report Share Posted January 29, 2010 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 Quote Link to comment Share on other sites More sharing options...
scarface Posted January 29, 2010 Report Share Posted January 29, 2010 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, Quote a New Year 2011 has come, and the challenge has just started 8-) Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.