- Search Crypto Craft
-
sangmane replied Jan 23, 2010use iBars(NULL,TimeFrame) for example int LastBar; int init() { LastBar = iBars(NULL,PERIOD_H4); } int start() { if(LastBar != iBars(NULL,PERIOD_H4)) { LastBar = iBars(NULL,PERIOD_H4); Print("New H4 Bar"); //checking candle start // .... //checking ...
Check based on Bull and Bears
-
sangmane replied Jan 10, 2010Squanto, Firstly, please note that my knowledge in MQL is most come from doing backtesting (trial and error things, you know that). By the lack of a full/detail MQL reference, there's nothing I can do except doing experiment and read other's ...
Bid and Ask appears to return current, even when BackTesting...
-
sangmane replied Jan 10, 2010Umm, there is misunderstanding. 1. There is no Bid() and Ask(). There's only Bid and Ask. I never told about Bid() and Ask(). 2. There is no Bid[] and Ask[]. The way array is wrote is append "[]" after vars name. What I meant was that MT4 dont ...
Bid and Ask appears to return current, even when BackTesting...
-
sangmane replied Jan 10, 2010In indicator, Ask and Bid will always return latest price. As CodeMeister said above, there is no Ask[] and Bid[]. To get latest price shown on chart by indicator, use Close[0]. This is Bid value. If you want Ask and Bid value relative to strategy ...
Bid and Ask appears to return current, even when BackTesting...
-
sangmane replied Jan 7, 2010Hi, To make MTF indicator using iBarshift, you only need the standard template / format of single time frame MA: int start() { int i, shift, counted_bars=IndicatorCounted(); i = Bars-counted_bars-1; while(i>=0) { shift = ...
How to get value for each bar from MTF indicator
-
sangmane replied Jan 7, 2010Hi, ArrayCopySeries() copy the time of the bars based on choosen timeframe to datetime array. if you set TimeFrame=1440, then TimeArray will contain values of daily bar time, not daily bar's price 2010.01.01 00.00 2010.01.02 00.00 2010.01.03 00.00 ...
How to get value for each bar from MTF indicator
-
sangmane replied Jan 6, 2010Hi, when dealing with closing/deleting more than one orders in a loop, you have to use cnt=orderstotal()-1 to 0. this is to make sure all orders get closed in one loop. if you use cnt = 0 to orderstotal()-1, some orders will remain open. this is ...
Closing Orders question
-
sangmane replied Jan 3, 2010well, i based on this rule: If you buy at the open of every 4 hour bar that's above the EMA 20 and close the trade at the bar's close, you have a 60% chance of a winning trade. what ea did is at the open of a new bar, it check if price (in this ...
Coin tossing and random entries
-
sangmane replied Jan 3, 2010hmmm, not sure if i interprets your rules correctly. but this is ea that i made to test
Coin tossing and random entries
-
sangmane replied Jan 3, 2010i just made an ea to test your theory. attaced pics are a balance curve of trade buy above ema 20 /sell below ema 20 and the reverse logic (buy below ema, sell above ema). the first strats produce 45% profit trade, the second produce... not 55%... ...
Coin tossing and random entries
-
sangmane replied Jan 3, 2010hi, i want to share my opinion about 50/50 or coin toss. having 50/50 win/loss doesn't mean we are breakeven. there is spread that affect our overall p/l figure. for example, if we use random entry and close order after price move exactly 10 pips in ...
Coin tossing and random entries
-
sangmane replied Dec 28, 2009halo adam, don't compare two double variables. i tested the following code: double d1 = 97.84000000-97.74000000; double d2 = 0.1; if(d1 == d2) Print("d1:",d1," = d2:",d2); else if(d1 > d2) Print("d1:",d1," > d2:",d2); else Print("d1:",d1," < ...
Problem with Trailing Stop Conditional Checking
-
sangmane replied Dec 17, 2009Hi c-speed, thanks for the info about the error. I've accidentaly mixed up lots calculation. When Martingale On, lot size is based on risk per trade. but when martingale off, i used external lots setting (0.01). I calculated lot size as follow: 1. ...
50 pips candle system
-
sangmane replied Dec 16, 2009Hello Kostas, Pls find 50 pips EA below, it seems using MA as filter give improvement in result. Adding Zebulon's evolution, almost double the account in 1 year. Unfortunately, it's only in backtesting lol. Your CCI filter seems contra productive. ...
50 pips candle system
-
sangmane replied Dec 15, 2009Hi Kostas, coding a filter addition to that EA is an easy task. choosing the right filter, the best parameters for filter and the rules/how the filter interact with standard 50 pips rules is the most tricky part. it doesn't fair to ask me to add ...
50 pips candle system
-
sangmane replied Dec 15, 2009Hi thefuture, pls find the indy below. i play with object property manipulation extensively to avoid writing the same lines of code again and again for 16 label object!!!. Do experiment with indy properties like XDistanceFromRightCorner and ...
Simple indicator help needed
-
sangmane replied Dec 15, 2009i suggest you to open a chart, drawn those required text manually and post the screenshot, so that we would be clearer about what exactly you want
Simple indicator help needed
-
sangmane replied Dec 14, 2009hi wendy, it seems your code contains too many variable and there is an access to a future value (High[i-1], Low[i-1]). instead of make some mods to you code, i modified my atr stop indicator and adding alert/sendmail feature. hope this help, stephen
Please help, where is my error?