asgard2
-
Posts
167 -
Joined
-
Last visited
Content Type
Profiles
Forums
Articles
Posts posted by asgard2
-
-
Re: Building your own EA G/08.
Ok Mate..
Sounds like you tried pretty hard.
This is the first piece of code I wrote.. it works but it is not really right.
The reason it is not right is because it tells the EA.. go through the history, count backwards and select by position the time the last order. Actually the order could be anything (not that it is likely to be anything else). It needs to select the order based on the comment. The comment will be "cancelled"
I tried to do that but the code never worked and I could not find anyone that knew how to do it.. so this works, it could just be better.
If anyone that can code better than me feels like helping.. that's great, else I have no problems with this.
extern int NextBuyStop_Order_Minutes =46; //put this line with your other variables //---------------------------------------------------------------------------------Put this block of code under this line "MayOpenDeferOrder = true;" if ((type == _OP_BUY) && (MayOpenDeferOrder && NextBuyStop_Order_Minutes !=0)) { total = OrdersHistoryTotal(); for(e = total - 1; e >= 0; e--) { OrderSelect(e, SELECT_BY_POS,MODE_HISTORY); if(OrderSymbol() != Symbol()) continue; { if(((TimeCurrent() - OrderOpenTime())/60) < NextBuyStop_Order_Minutes) MayOpenDeferOrder = false; break; } } }
Now you see that code.. you should be able to write the on for the sell side.
-
Re: POST YOUR EX4 HERE !!!! ( PART 2) :D
Anyone who have ex4-to-mq4 decompiler 225 , please share it ,So many thanks in advance. ^:)^
Why do you want this.. it is no different than 224 is it?
-
Re: (REQ) Help to educate wonderful indicators
Well, I was going to have a go at this for you but.. there are so many.
Why don't you try one at a time and pick the one you want the most first.
-
Re: Building your own EA G/08.
To make it sell on any currency other than the Japanese Yen.. you need to lower the sell deny level to zero or not much more.
If you are going to use the sell logic you will need to change it or.. you need to put in some pretty severe rules to stop it taking over the buy logic.
Relatively the old and new codes are the same, the old DenyLevels are the prices in pip values and new ones are the actual price values. They are just a matter of settings.
That similarity aside, these Deny Levels are fixed by settings, to prevent from buying too high or selling too low. But as they are static absolute values, it is a case of all-or-nothing settings. In the demo video, the BuyDenyLevel is set at 160, so ALL buy trades are allowed as the Ask prices never exceed 160 (except for some JPY pairs); and the SellDenyLevel is set at 155, effectively blocking ALL sell trades (except, again, some JPY pairs). So the simplistic static settings are not correct, and should be changed to cater for each pair dynamics.
Good for you Mate.. well done.
Suggestions?
I think sell settings and buy settings are never the same.. I have split most of the code in two, so I can optimize on both.
-
Re: Building your own EA G/08.
OK.. now about the sell side of Greezly
I believe the original code was this.. found it in an older version
double _BuyDenyLevel; double _SellDenyLevel; _BuyDenyLevel = (BuyDenyLevel * _Point); _SellDenyLevel = (SellDenyLevel * _Point); if(type == _OP_BUY) { if(UseBuy == 0) return(false); if((_OrderType == OP_BUY) && (OpenRealOrders == 0)) return(false); if((BuyDenyLevel !=0) && (_OrderOpenPrice >= _BuyDenyLevel)) return(false); } if(type == _OP_SELL) { if(UseSell == 0) return(false); if((_OrderType == OP_SELL) && (OpenRealOrders == 0)) return(false); if((SellDenyLevel !=0) && (_OrderOpenPrice <= _SellDenyLevel)) return(false); }
The orignal code was modified to this by someone..
if(type == _OP_BUY) { if(UseBuy == 0) return(false); if((_OrderType == OP_BUY) && (OpenRealOrders == 0)) return(false); if((BuyDenyLevel !=0) && (_OrderOpenPrice >= BuyDenyLevel)) return(false); } if(type == _OP_SELL) { if(UseSell == 0) return(false); if((_OrderType == OP_SELL) && (OpenRealOrders == 0)) return(false); if((SellDenyLevel !=0) && (_OrderOpenPrice <= SellDenyLevel)) return(false); }
To make it sell on any currency other than the Japanese Yen.. you need to lower the sell deny level to zero or not much more.
If you are going to use the sell logic you will need to change it or.. you need to put in some pretty severe rules to stop it taking over the buy logic.
-
Re: Before buying an Expert Advisor
@asgard2,I might be able to code the short side of the trades of greezly EA, do you want me to look into it?
If interested PM me your email adi and I have a look at it!
cheers,
Joe
Thanks for the offer mate.. I think I have it nearly sorted.
-
Re: Before buying an Expert Advisor
asgard2, May we know what Broker you use? You say it is a 5 Digit broker, is it also ECN?Thanks.
the Broker is FXPro and they are 5 digits.. they are also a pretty good broker for me.
Not ECN though
-
Re: Before buying an Expert Advisor
This robot is coming from the kitchen of Steven Lee Jones. So far no product from him are good and from low quality. So don't expect too much from this robot. Only this time another moderator have presented this product and not him like Forex Espionage or Forex Supernatural. Always no really proof and always he shows only a few good trades. But the video shows also strange proof.....Forex Supernatural was a copy of a famous free Robot...
Thanks,
megainvest
What robot are you talking about mate?
The video is a modified version of Greezly that I made myself.
OTOH, the one we are talking about at the end is one from the metaquotes site. Different Ea's.. not sure what kitchens have to do with it :-?
-
Re: Building your own EA G/08.
Thanks. I understand that you are trying to help with these code snippets, but this one is purely cosmetic and, imo, does not really say anything much about your approach. A more "meaty" content probably will be appreciated. ;)
Hmm..
Not everyone can code. Some might like to make an EA and this is a good start for them.
The last piece of code is posted to aid visual testing. Not everyone knows about it.
so far there is a list of proven improvements, a video demonstrating trading style, the EAs and the most crucial piece of the code.
If someone can already code they don't need me. Its already there.
For those that cannot code, I will post more when I at least see people are trying to do this themselves.
This is not supposed to be a giveaway, if no one wants to help each other.. then why would I?
Some here might like the opportunity to lean something that will benefit them well beyond the scope of this EA.
So, anyone wants me to post more code.. solve one of the problems and post the code for others to share.
Right now, I suggest someone post the other half of the order deletion. Meaning after a buystop order is deleted there has to be a delay before the next one.
-
Re: Building your own EA G/08.
Here you go people,
If you put this code in just after start.. you will find visual testing easier and if you change the version each time you update you will be able to keep track of which version traded which way.
double free=AccountFreeMargin(); Comment("\n", "Your Version here", "\n", "Account free margin is ",DoubleToStr(free,2),"\n","Current time is ",TimeToStr(TimeCurrent())); //-----------------------------------------------------------------------------------------------------------------------------------------
-
Re: Building your own EA G/08.
Change Inputs
BuyLimitLevel and
SellLimitLevel to -1
correct ?
Could be, I only use it on a 5 digit broker (because I am having trouble with 4)
I stopped the limit orders by setting them to 1200.
It doesn't try to order then. That was a while back and I have been so busy with the rest of it, I never bothered investigating
-
Re: Building your own EA G/08.
Hello asgard2,
Thanks for the kind action. Sorry to ask again, as I keep having "The download session has expired" message. Is it possible to request for the upload to 4sh@red?
Thanks.
Regards,
Collin
Its working now (I checked this minute).. you need to remove the asterisk from the address.
I don't have a 4shared account.
-
Re: Building your own EA G/08.
Could I request any kind soul to upload the video to 4sh@red? I can't download the video as it mention maximum download (10 times) has been reached.Thanks.
Regards,
Collin
Hmm.. not sure what happened there but here it is again
-
Re: Building your own EA G/08.
Hello asgard2,
First of all, thank you for the sharing! :-bd
above list is from your post on another thread, can I check if the above code is referring to one of the list mentioned.
- do you have coding on adding on some filters, e.g MA filters or filter from another indicator.
I do mate... however, I really want people to be helping each other. More ideas, better code and a better EA will be the result.
If I post all the code, I may as well post the EA and no one will learn anything.
if we get some active people trying to do something, others who have no clue (like me a short time ago) will be able to follow and learn.
Even though this is the best EA I have seen, some people will go on to make other EAs that will be far better than this one.
Thats my plan anyway :)
I am really down on the commercial EA's. Most are just a rip off of someone else's EA that they ask you to buy.
No Commercial EAs that I know of are profitable although many could be. Its time to change the whole ripping people off system. Idealist?.. Yup!
Greezly gave his EA away after the championships was over. That is why the source is available. Kudos to him, what a trooper!
-
Re: Before buying an Expert Advisor
What is it about MM3 that you like? The results I've seen so far haven't bowled me over but maybe I'm looking in the wrong place. What pairs/timeframes are you using it on?
Personally I don't think the extra WPRs add anything to the signal. I think it needs something else totally different to confirm it. I'm not sure if something like the crossover on the RVI (the Ehlers Vigor one) is that. Maybe also a filter like ATR to make sure there's enough room for price movement.
I must admit having a second look at the Greezly I'm finding it more interesting. Mostly curiosity to see what makes it tick. Gepard is a bit more of a struggle as there are only "educated" variable names to go by.
If you want someone to bounce ideas off and to help coding though I'm happy to chip in. I develop for a living and MQL is second nature for me. Start another thread on it... :)
What I like about mm3 is that I see a bunch of potential in the way it trades. For example, the way it is, it opens 3 orders at once.. if the market goes south on a buy, then the mistake is three times worse.
That is the first thing to fix. He has some good ideas and with the right settings I find the logic good. It trades a lot, leaving potential for a lot of "don't trade when this happens" rules. You will still have plenty of trades left that will make a profit.
that is what i think so far.. of course, I haven't started on it yet so I may change my mind.
-
Hello People,
I am starting this thread because I have had so many PMs wanting to purchase my EA.
Here is the video link of it .. http://rapid*share.com/files/281613188/TradeDemo.rar
This is the discussion so far...http://indo-investasi.com/viewtopic.php?f=6&t=5559&start=0
I did not build it to sell it and it is not for sale. I posted about it because you can all do it too and that was my point. I am happy to help.
I am no coder (so don't give me a hard time) but the time I invested is paying dividends.
If you want to do it yourself.. this is the first piece of code I added. You can just cut and paste it in.
//paste this with your other variables extern bool UseDeferOrderTimeout =1; extern double StopResetMinutes =14; if( UseDeferOrderTimeout >0) //this piece of code deletes the order { total = OrdersTotal(); if(total>0) for(i = total - 1; i >= 0; i--) { OrderSelect(i, SELECT_BY_POS, MODE_TRADES); if(OrderType()==OP_SELLSTOP && OrderSymbol()==Symbol()) { if((TimeCurrent() - OrderOpenTime()) > StopResetMinutes * 60 ) { if(PrintComments) Print("Sell Stop Deleted."); OrderDelete(OrderTicket()); } } } }
That is a start and it will change the way it trades.. now you need to figure out.. a time delay between the deleted orders.
you can help each other.. if you do, then I will post some more code.
Now, I will warn you.. it actually took me many many hours and it is not finished. If you are not a coder, don't expect to finish anytime soon.
Edit: don't know what I was thinking "UseDeferOrderTimeout" is bool .. I have corrected it now
-
Re: Before buying an Expert Advisor
Hell it's interesting, start a new thread... \m/
Incidently, this apparently is live account stats from Gepard:
h**p://www.onix-trade.net/?act=monitoring_stat&xid=6259
How did you find out these are Gepard?
Looks about right though from my own backtesting.
Big drawdown, no stoploss.. not that that worries my particularly, so long as it survives....nothing ventured, nothing gained.
-
Re: Before buying an Expert Advisor
Thanks for that. It's interesting that Gepard and Greezly have so many features in common, either one inspired the other or there was another that inspire both. It would be nice to get the real mq4 (not educated) file for Gepard, I know it's out there! :)
I never had the original source from Gepard or I would post it for you all. All I had to go on was the list of variables that I just posted.
I believe Gepard is someones variation of greezly. Code is so close.
-
Re: Before buying an Expert Advisor
I am worried this is getting too off topic and if the mods want to delete this feel free and accept my apologies.
Here are some clues to what the Gepard Variables are.
General,
Input parameters.
For the General tab check the boxes (ticks) opposite items "Allow trading adviser" and "Enable signals (at points "hand proof" and "not to repeat the signals flags should not be), should be at Long & Short positions, the remaining settings to leave default.
After pressing the button «OK» Advisor automatically appear on
graph in the upper right corner. To ensure that the adviser should be worked, that the icon next to the adviser looked like ?
If there is a cross, then locate on top of the terminal button "Advisors"
and then it should Adviser «zaulybatsya». All Advisor is enabled, is now
just wait, soon after moving Adviser on schedule begins analysis of the market and the opening of the warrants on algorithms adviser.
On the "Input settings" you can change the settings (variables)
to trade.
Appendix 2.
A brief description of the settings Adviser
All variables are prefixed with "s" means the same as the variables with
prefix "d", only with the possibility of installation for each currency pair
its significance. These values are listed in a row and are separated by a
semicolon.
For example, dFixedStopLoss - the size of a fixed stop-loss points in
for all currency pairs, sFixedStopLoss - a string specifying the stop-loss points in for each currency pair separately, for example, "EURUSD: 300; GBPUSD: 400.
If the currency pair is not specified in the special string configuration,
then it will be used by the general meaning.
T
hat is, d.. - The total value of all currency pairs, s.. - Transfer
values for each currency pair separately.
Parameter Brief description
LicenseKey
license key for advisers on a real trading account
sSymbols1 sSymbols2
currency pairs to trade
sUseBuy use BUY-opening position (to buy)
sUseSell opening SELL-use items (for sale)
dUseOnlyPlusSwaps
sUseOnlyPlusSwaps
used to open only the position of
positive swaps
MaxSpreadForTradeSymbol
the maximum allowable spread to the possibility of
trade for each character
dRisk
sRisk
risk level - the size of the lot of the balance of free
funds, and if 0, trade is minimal
given fathomable
MaxOrdersCount
limit on the total number of open orders (0 --
no limit)
dMaxSymbolOrdersCount
sMaxSymbolOrdersCount
restriction on the maximum number of warrants
open on one instrument (0 - no
limit)
MaxOpenValPosition
restriction on the maximum open position
in one currency (0 - no limit) is measured in
numbers of standard lots for the opening position (in
Variable Risk)
dUseOneWayRealOrdersB
use the single open positions
BUY (to buy)
sUseOneWayRealOrdersB
dUseOneWayRealOrdersS
sUseOneWayRealOrdersS
use the single open positions
SELL (for sale)
dMinDistanceRealOrdersB_PR
sMinDistanceRealOrdersB_PR
minimum allowable distance as a percentage of
prices between the one-open
positions BUY
dMinDistanceRealOrdersS_PR
sMinDistanceRealOrdersS_PR
minimum allowable distance as a percentage of
prices between the one-open
positions SELL
dFixedTakeProfit
sFixedTakeProfit
a fixed amount of take-profit in the settlements
dFixedStopLoss
sFixedStopLoss
fixed size stop-loss points in
dTimeStopLoss_Minutes
sTimeStopLoss_Minutes
temporary stop-loss: time (in minutes) for
after which the actual order is closed (0
- Do not use)
TimeSL_OnlyAfterDistance_PR
to close the warrant for the temporary stop-loss only
after a specified distance as a percentage of the price
Opening (0 - not used)
dTrailingStop
sTrailingStop
the size of trailing stop at points (0 - no
use)
dStepTrailingStop
sStepTrailingStop
step sensitivity to shear TrailingStop,
trailing stop will pull up only when
change in the price of this number of points
CloseOrdersOppositeTrend_OsMA
close the open warrant protivonapravlennye
trend of the indicator OsMA
CloseOrdersOppositeTrend_SAR
close the open warrant protivonapravlennye trend indicator for SAR
CloseOrdersOppositeTrend_ALL
close the open warrant protivonapravlennye trend only at the same time on all indicators.
(OsMA and SAR)
CloseOOT_OnlyAfterMinutes
close the open warrant protivonapravlennye
trend only after a specified number of minutes after
Opening (0 - not used)
CloseOOT_OnlyAfterDistance_PR
close the open warrant protivonapravlennye
trend only after a specified distance of
percentage of the price discovery (0 - not used)
CR_UseCorrection
use of open warrants correction
traffic
CR_WaitCorrectionAfterMove_PR
expect after the correction of motion on a given
Quantity per cent
CR_WaitCorrectionAfterFlat_PR
expected correction after a relatively fleta not
more of the
ForexTeam GEPARD © e-mail: forex.ex4 @ gmail.com
CR_MaxDistanceFromBottom_PR
maximum distance from the bottom of motion for
opening orders
CR_SizeCorrection_PR
expected correction of a specified amount of interest
CR_StopLoss_PR
stop-loss at a given quantity of interest for
orders that are open to the correction of motion
CR_StopLoss_UseSAR
set stop-loss orders to open at
motion correction, the SAR indicator
CR_UseTrailingStop
use trailing stop orders to open for correction of motion
CR_AnalizMove_Period
period for the analysis of the movement to correct
CR_AnalizMove_CountBars number of bars to analyze traffic to correction
CR_AnalizFlat_Period period for the analysis of relative fleta
CR_AnalizFlat_CountBars
number of bars for the analysis of relative fleta
dUseFlatIndicator
sUseFlatIndicator
flet indicator used to open orders
diFL_MinWidthCanal_PR
siFL_MinWidthCanal_PR
the minimum allowable width of the channel (in
percentage of price) for the indicator flet
diFL_MaxWidthCanal_PR
siFL_MaxWidthCanal_PR
the maximum permissible width of the channel (in
percentage of price)
diFL_MinExtremumsCount
siFL_MinExtremumsCount
minimum required number of extrema in
channel on each side (extremum believe values below 1 / 4 and above 3 / 4 the width of the channel)
diFL_Period
siFL_Period
period (time frame) for the analysis Flat
diFL_CountBars
siFL_CountBars
number of values of the analyzed period iFL_Period
diFL_UseConditionTakeOver
use the condition of absorption (the candles,
completely absorbing next candle)
diFL_PeriodTakeOver period (time frame) to find the spark absorption
diFL_CountBarsTakeOver minimum quantity of absorbed candles
diFL_StopLoss_PR
siFL_StopLoss_PR
stop-loss as a percentage of the price for the warrants,
offered by the indicator Flat
diFL_StopLoss_UseSAR set stop-loss indicator for SAR
diFL_LotSizeMultiply
siFL_LotSizeMultiply
multiplier for the size of the lot warrants
offered by the indicator Flat
dUseAcceleratorIndicator
sUseAcceleratorIndicator
accelerate the use of indicator
diAC_CountBars
siAC_CountBars
number of analyzed values of the indicator
Accelerator
diAC_CountTimeFrames
siAC_CountTimeFrames
count in the period (time frame)
indicator Accelerator
diAC_StartTimeFrame
siAC_StartTimeFrame
the initial (lowest), the period
(time frame) for the indicator Accelerator
dUseSpeedIndicator
sUseSpeedIndicator
use of speed indicator
diSP_CountBars
siSP_CountBars
number of analyzed values of the indicator Speed
diSP_CountTimeFrames
siSP_CountTimeFrames
count in the period (time frame)
Speed Indicator
diSP_StartTimeFrame
siSP_StartTimeFrame
the initial (lowest), the period
(time frame) for the indicator Speed
dCountHighLowLimits
sCountHighLowLimits
number of restrictions
HighLowLimit: "do not buy the top, not to sell
bottom-up "
diHL_LimitDistance_PR
siHL_LimitDistance_PR
maximum allowable deviation of prices in
Percentage of Low / High for the possibility of opening Buy / Sell
diHL_Period
siHL_Period
period (time frame) for the analysis HighLow
diHL_CountBars
siHL_CountBars
number of values of the analyzed period iHL_Period
to determine the Low / High
dUseTrendFilterOsMA filter trend movements OsMA
diOsMA_TimeFrame period (time frame) for the analysis OsMA
diOsMA_FastEMA
averaging period for calculating the fast
moving average
diOsMA_SlowEMA
averaging period for calculating the slow
moving average
diOsMA_SignalSMA
averaging period for calculating the signal
line
diOsMA_TypePrice price used to calculate the indicator OsMA
dUseTrendFilterSAR filter trend movements Parabolic SAR
diSAR_TimeFrame period (time frame) for the analysis of PSAR
diSAR_Step increase the level of foot
diSAR_Maximum highest level of foot
TypeOfQuoteDigits
Type bit quoting: 0 - auto, 1 - standard (level 4), 2 - Advanced (5
level)
CustomNameForCurrencyPair
template name for the currency pair (AAA - the first
currency pair, BBB - the second currency pair)
dMinLotSize
sMinLotSize
minimum lot size (0 - to use
configure the broker)
dMaxLotSize
sMaxLotSize
the maximum size of the lot (0 - to use
configure the broker)
dStepLotSize
sStepLotSize
step changes in the size of the lot (0 - to use
configure the broker)
dSlipPage
sSlipPage
allowable deviation of prices for market
warrants
Set_TP_SL_ByModifyOrder
set take-profit and stop-loss by
modification of order, not just at the opening
TestingOneSymbolMode allow the testing regime
OwnMagicPrefix
prefix of its own meydzhik-numbers
open orders
PrefixOrderComment prefix comments to all orders
offered Adviser
-
Re: Before buying an Expert Advisor
I am working on MasterMind3 now, if anyone wants to work with me on this, I think it will be really profitable.
It is always better to hedge your bets with more than one good EA.
I am not much of a coder but I am good for the simple stuff.
Maybe we could all do it and share some ideas.
Here is a tip for anyone who is doing greezly/gepard right now.. go with a 5 digit broker to start or else you will drive yourself nuts.
-
Re: Before buying an Expert Advisor
That looks like a good strategy you've got there. I think I know which EA it was based on but I like what you've done to it.Its no secret, the EAs this is based on (or the logic anyway) is Gepard and Greezly. I used the Greezly base code and imported the Gepard logic as an addition to get more trades.
Then I simply added the rules I listed on the front page. It is still a work in progress.. I expect I can double the output when I find some sell logic to import.
Neither Gepard or Greezly has sound sell logic.
-
Re: EA TRADING FROM HOME
No loss yesterday and today.FRED at EU earned a total of $62.50 in my real money standard account, just today alone.
FRED goes well with my current settings...
Hey Mate,
which version of Fred are you using..Fred from the Fred site or the one from the russian site?
-
Re: Before buying an Expert Advisor
Very nice video, seemingly nice EA. However, I have a question: at 4:43 in the vid, a long position is entered, then the market goes against you for a while, eventually retracing and letting your position go into profits after many hours. How would your EA deal with it if the market didn't retrace? Would it close the position at some kind of expiration time?
No, the stoploss works on reverse logic + percentage.
So, the buy logic is reversed, add percentage of drawdown and eval equity @30 %. if a buy logic reversal never happens the stoploss will never kick in.. all that is left at that point is the equity protection at $5000. Even the equity protection is dynamic.. doesn't kick in until after the balance equals 10,000.
But hey.. this was never meant to be a safe business.. just profitable.:)
Seriously, I want reliability and consistency, the safety factor I don't leave to the EA.. it is supposed to be fearless.. I am the chicken.
I do trust the logic will reverse if it needs to. The doubles my initial 5000 balance in two days.. so if I take it out, not much can be lost.
-
Re: Before buying an Expert Advisor
Ok, I made the video..
I chose a period that is pretty volatile so it shows the resetting of the stop orders..
I am not much of a movie maker but it shows the way it follows the market from high to low. So I guess it does what it is supposed to.
http://rapidshare.com/files/280387249/TradeDemo.rar.html
The point should not be lost here.
Anyone can have an EA that trades the way they want it to, just by learning the very basics of coding and investing some time.
Building your own EA G/08.
in MetaTrader Expert Advisors
Posted
Re: Building your own EA G/08.
You could try this with a magic number..
It is not my priority now.. but I think this should work.. why dont you test it and let us all know