HedgeEA - page 3

 

darn - what am I doing wrong - I just re-downloaded it, put it in my experts - then I see it but it is grayed out like it is an ex4 file, but it is not - so I choose modify and from there I compile and get the 3 errors..... am I doing someting wrong???

 

How to test ? ? ? ?

Well, I think that we have very little information about how a particular hedge performes.

My sugestion if it is possible to make a small EA that dump to a file all information about the hedge. Something like:

Price1;Swap1;Price2;Swap2;Correlation;BB

after some time we can plot charts and optimize parameters. This should be done ASAP, so when we have a stable version we have at the same time optimization values.

I think the big surprise will come in Take Profit value, and the account size necessary to use it properly. Money manager routine should be adjusted too. I do not think this money management is proper for this EA. We need to include leverage on MM for instance. MM is the fundamental piece of the EA, we need to improve it

Another parameter that need to be studied is ratio... how to use it on our favor?

Attach is some documents that I've uploaded to elite thread that can be usefull to this developments.

Lets make a brainstorm

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Volatility as a Clue

Most traders have heard the story of Long Term Capital Management (LTCM). For those who have not heard the story, LTCM was a hedge fund designed to take advantage of situations where the price volatility of a financial instrument would go from higher than average to normal (the mean). Can lowly traders such as ourselves take advantage of volatility as a warning that large moves are coming? The answer is yes. Most traders would agree that periods of high volatility are usually followed by periods of low volatility. But what about the other way around? Are periods of low volatility followed by periods of high volatility? They are indeed (most of the time). Today, we will briefly discuss a strategy that you can use to take advantage of volatility explosions.

Here is a quantified signal to take advantage of these occurrences. We are going to focus on getting clued in on volatility increases before they occur. Optimized historical tests have shown that it's effective to compare 6-day historically volatility against 100-day historical volatility. When 6-day historical volatility is 50% or less than 100-day volatility, this tells us that the stock or index has calmed down and it becomes likely that a large market move is about to happen. Keep this in mind if you are considering entering a straddle. You can use this technique to find ideal entry points. One extremely effective technique for entry is to find a stock that fits this low volatility criteria. Once the stock breaks out of a tight range (which should be in place based on low volatility), trade the stock in the direction of the breakout. So if the stock plummets downward, then sell short, and if the stocks shoots up, go long. Usually, the longer a stock or market index stays in this low volatility state, the larger the move will be once it breaks out.

You should use stops with this technique in the following way. Once you get a breakout following the period of low volatility, take note of the high of the breakout day if it is a bullish breakout. Once the stock closes above the high of the breakout day, then go long on the stock. Use the low of the breakout day as your stop loss price in order to reduce risk.

Price Headley is the founder and chief analyst of BigTrends.com.

Now! How to implement this on our EA?? This would improve a lot our strategy!

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

//+--------- --------- --------- --------- --------- --------- ----+

//+ Calculate cost in USD of 1pip of given symbol

//+--------- --------- --------- --------- --------- --------- ----+

double PipCost (string TradeSymbol) {

double Base, Cost;

string TS_13, TS_46, TS_4L;

TS_13 = StringSubstr (TradeSymbol, 0, 3);

TS_46 = StringSubstr (TradeSymbol, 3, 3);

TS_4L = StringSubstr (TradeSymbol, 3, StringLen(TradeSymb ol)-3);

Base = MarketInfo (TradeSymbol, MODE_LOTSIZE) * MarketInfo (TradeSymbol,

MODE_POINT);

if ( TS_46 == "USD" )

Cost = Base;

else if ( TS_13 == "USD" )

Cost = Base / MarketInfo (TradeSymbol, MODE_BID);

else if ( PairExists ("USD"+TS_4L) )

Cost = Base / MarketInfo ("USD"+TS_4L, MODE_BID);

else

Cost = Base * MarketInfo (TS_46+"USD" , MODE_BID);

return(Cost) ;

}

//+--------- --------- --------- --------- --------- --------- ----+

//+ Returns true if given symbol exists

//+--------- --------- --------- --------- --------- --------- ----+

bool PairExists (string TradeSymbol) {

return ( MarketInfo (TradeSymbol, MODE_LOTSIZE) > 0 );

}

 
sdln28:
darn - what am I doing wrong - I just re-downloaded it, put it in my experts - then I see it but it is grayed out like it is an ex4 file, but it is not - so I choose modify and from there I compile and get the 3 errors..... am I doing someting wrong???

Delete all hedge ea's on your experts exit your platform, copy again the expert to the directory and reenter

 

ok - I just did that - and I downloaded the copy fron cturner's post - and I get the same 3 errors. I have many other experts I am not having this problem with so I feel like my Metatrader is ok ... any other ideas - could I get you to post your copy???

 

Copy Of Version 5.4

This is the exact copy of the EA posted before

Files:
 

Thanks - sorry to bother, no luck - I guess this one is just not going to work for me but I am enjoying the posts on this one. Best of luck!

 

Mine is working fine

sdln28:
ok - I just did that - and I downloaded the copy fron cturner's post - and I get the same 3 errors. I have many other experts I am not having this problem with so I feel like my Metatrader is ok ... any other ideas - could I get you to post your copy???

It seems to be working fine for me. No errors.

 

Maybe my version of metatrader is different somehow??? Is that possible?? I am using version 4.00 build 198

 

same version here..

here you have the .ex4 for that mq4

shortcut rulez ...

Files:
 

That did the trick!!!! Thanks kokas!

Reason: