- Search Metals Mine
- 110 Results (2 Threads, 108 Replies)
-
a_trader replied May 5, 2011hmm, i gave it the wrong name instead of once per signal, that code is for once per bar im fixing to go to work, so il have to walk you through it later i can tell you now that you use a boolean ( true/false) for each buys and sells
Coders Corner
-
a_trader replied May 2, 2011this code shows how to edit a order after it is opened you can use the High[0] or Low[0] of the candle for a sl
Coders Corner
-
a_trader replied May 2, 2011it was done that way intentionally. it works better when testing, and is more reliable in a fast market. if the price moves to fast that we couldnt trade, it will still be accurate since i used the high
Coders Corner
-
a_trader replied May 1, 2011I guess your right. I dont know programming. I taught my self everything, so i am probably wrong on alot. I didnt go to school, I am definatly a rebel. Sorry if i mis teached anyone.
Coders Corner
-
a_trader replied May 1, 2011Break Even — put this at the top extern bool use_breakeven=false;// standard break even extern int BreakEven= 20; put inside start() breakeven(); the function void breakeven() { int totalorders = OrdersTotal(); for(int ...
Coders Corner
-
a_trader replied May 1, 2011Trailing Stoploss — at the top extern double TrailingStop= 20; inside start() somewhere trail(); the function, at the very bottom void trail() { for (int i = 0; i < OrdersTotal(); i++) { OrderSelect(i, SELECT_BY_POS, MODE_TRADES); if ...
Coders Corner
-
a_trader replied May 1, 2011Closing Trades — put these inside the start() close_all(); close_longs(); close_shorts(); close_all_in_profit(); put these at the very very bottom void close_all() { int totalorders = OrdersTotal(); for(int i=totalorders-1;i>=0;i--) { ...
Coders Corner
-
a_trader replied May 1, 2011Counting Orders — orders should be counted before anything they should also be re counted any time a trade is opened or closed put this at the top int buys,sells,buy_pending,sell_pending; double buy_lots,sell_lots; put this in start() function ...
Coders Corner
-
a_trader replied May 1, 2011Trading once per signal — put this at the top int ticket,current_bar; Heres the code. if (!GlobalVariableCheck("current_bar"+WindowExpertName()+Symbol()+IsTesting())) GlobalVariableSet("current_bar"+WindowExpertName()+Symbol()+IsTesting(),1); ...
Coders Corner
-
a_trader replied May 1, 2011Code for 4&5 digit brokers — this makes your code work on 4 & 5 digit brokers by replacing Point with my_point put this at the top double my_point; put this inside init() if (Point==0.0001||Point==0.00001)my_point=0.0001; if ...
Coders Corner
-
a_trader replied May 1, 2011I do have a good template. I was gonna bring it out later, but sooner might be better. //----Edit---- I will explain more about this template while this post is editable. This template is advanced, i have been working on it for about 5 years. There ...
Coders Corner
-
a_trader replied May 1, 2011Im not giving you the exact code, but code you can edit. just set the tp & sl after the order is opened. A pending order counts. Here is some code you can paste and edit. ticket=0; ...
Coders Corner
-
a_trader replied May 1, 2011Variables — Variables tell us what type of data we are using. Here are the types of variables you will see in mql4 int double string color time int = a whole number (integer) double = a number with a decimal string = text color = text (name of ...
Coders Corner
-
a_trader replied May 1, 2011Basic Structure Part 2 — More on basic structure Here is a simple function that has 1 level function_1() { }Here is a simple function that has 2 level's function_1() { if (something) { do something=0; } } Here is a simple function that has 3 ...
Coders Corner
-
a_trader replied May 1, 2011Basic Structure — The structure is the backbone to understanding programming. Here is what you will see. if (this or that)do=this; if (this or that){do=this;and_do_this=this;and_do this_to=this;} so ... if (this or that)do=this; if (this or ...
Coders Corner
-
Coders Corner
Started May 1, 2011|Platform Tech|32 replies
This thread serves as a resource to people learning to code. Any questions about coding are ...
-
a_trader replied Dec 8, 2010ok i just thought of the possible problem your mt4 must be old, and those indies were compiled with a newer version than you have
Something strange with mt4: Template not working
-
a_trader replied Dec 8, 2010try updating mt4, run live update exe in the instalation folder, if nothing happens, u might be up to date i have build 229
Something strange with mt4: Template not working