- Search Crypto Craft
-
sangmane replied Oct 21, 2009from this line: double lot=Lots; ... if(losses>1) lot=NormalizeDouble(lot-lot*losses/DecreaseFactor,1); first, you have initial lot size, named Lots (look at extern variable, at the top of the code) let's say Lots = 0.2. then there is ...
noobie question
-
sangmane replied Oct 20, 2009here is the volume-weighted MACD. i don't see any advantage of it, compared to original MACD.. sangmane
volume-weighted MACD
-
sangmane replied Oct 18, 2009you can use this function to calculate number of consecutive losses int CountLosses() { int orders=HistoryTotal(); // history orders total int losses=0; // number of losses orders without a break //---- calculate number of loosing trades without a ...
Help. One trade per hour ea and count trades?
-
sangmane replied Oct 17, 2009hi johnny, From your code, it seems that you assume OrderProfit() has one point unit price. OrderProfit() doesn't equal to Bid-OrderOpenPrice(). if OrderProfit() return a value of 1, it doesn't mean your profit is 1 point. OrderProfit() depends on ...
Help! - How to make trailing stop loss take losses?
-
sangmane replied Oct 17, 2009hi, have you try parabolic sar or chandelier stop or gann hilo?
Trailing stop and reverse
-
sangmane replied Oct 17, 2009pls find the attached code below. let me know if it works or not. i also posted an EA that using this trailing code, along with the tester graph. not bad for a simple EA.
Can a trailing stop be added to this EA?
-
sangmane replied Oct 16, 2009(the code contained typo error, i've uploaded the correct one) here is the logic of the added trail stop: supposed that open price is 1.40000 in long position: - when price moved to 1.4050 (open price+50pips), sl is set to 1.4025 (open price + 25 ...
Can a trailing stop be added to this EA?
-
sangmane replied Oct 16, 2009here is my trailing stop code based on your criteria. i hope it could work as expected.
Can a trailing stop be added to this EA?
-
sangmane replied Oct 6, 2009hi, it's a chandelier exit indicator. just search chandelier in this forum.
Indicator request
-
sangmane replied Oct 6, 2009OP_SELL and OP_BUY is a constant which have the value: OP_BUY = 0 OP_SELL = 1 so, this code: if (OrderType() <= OP_SELL) which is identical to "if (OrderType() <= 1)" will always be executed wether the OrderType() value is 0 for buying or 1 for ...
Modified Trailing Stop Routine
-
sangmane replied Oct 6, 2009i think mindistance is the minimum difference between the current price to the stoploss or take profit. for example, for a buy order, if the current price is 1.4567, we cant put stoploss at 1.4566 because it is too close. the minimum clearance ...
all order trailing stop from order placed point
-
sangmane replied Sep 21, 2009Hi bubblepips, platanero has corrected your original EA, but there is a single missed correction => if((UpperBoll-LowerBoll)<BollWith) change it to if((UpperBoll-LowerBoll)<BollWith*PipPoint) it should work now. hope this help
I code your Expert Advisors / Indicators
-
sangmane replied Sep 21, 2009Hi, u can download MQL tutorial here url regards
Where to start to learn to programme EA.
-
sangmane replied Sep 21, 2009hi simran, move "BarsCount = Bars;" line after /////////// if (Bars > BarsCount) { ////////// This is the only cause why there are multiple open order on the same bar. The logic of " if (Bars > BarsCount)" is to detect the first tick on the new bar ...
Need Help Spotting Coding Error
-
sangmane replied Jul 18, 2009hi, if (Close[0] < iLowest(NULL,0,MODE_LOW,5,1)) Order = LONG_EXIT; this function => iLowest(NULL,0,MODE_LOW,5,1)) will return value 1, 2, 3, 4 or 5, depend on which bar has the lowest value. to get price value at that bar, we have to use ...
Exiting Trades on iLowest and iHighest
-
sangmane replied Jul 18, 2009hi, here the modified code. hope this help
ATR in pips indicator help.
-
sangmane replied Jul 18, 2009hi, to make it draw histogram instead arrow, open the code in metaeditor, change DRAW_ARROW to DRAW_HISTOGRAM and delete the line contain SETINDEXARROW. dont forget to make a backup copy of the original file so when things go wrong, you can revert ...
need help!