Cost Averaging System - page 26

 
Aaragorn:
Ok i've got it down to this....

One array which contains concatenated values for both variables linked together AND they are partially filtered for being unique. What that means is that they are values which are openings which are not equal to closes. That means that the only remaining duplicates are for the values which were duplicated in the openings themselves. So all that remains to end up with a unique list is to filter out the duplicates which are duplicated within the openings... and they are all in one array.

As for the showing appreciation to developers? I'm all for it, I accept tips.

To where shall I direct my cashier's check, sir?

 

Condition for additional positions

forex4syg:
Hi Maji,

I am running test for four majors, and EUR/JPY, EUR/CHF and USD/CAN. Settings are shown in the attached file " rsi_w_trend_v3.txt".

extern double TakeProfit = 150;

extern bool UseTrailingStop = true;

extern double TrailStart = 20;

extern double TrailStop = 20;

Results up to now are shown in the attachment.

4062951 2006.10.31 02:00 sell 0.10 usdjpy 117.55 117.54 116.05 2006.10.31 09:05 117.54 0.00 0.00 0.00 0.85

The Sell position for USD/JPY had profit about about 15 pips, but trailed stop at 1 pips.

Could you please take a look if the trailing stop is working as you expected?

Thanks!

Scott

Hi Maji,

The attachment is statement up to now. Could you take a look at the USD/CAD positions (with 15 min chart)? I feel the condition to open additional positions may be improved. Currently, it checks the cross up/down the buy/sell level for RSI.

These days, I am monitoring those tradings, and think if it can be improved in such a way:

if(LongTrade)

if(fRSI_C>BuyLevel && fRSI_P= (PipStep*Point))

{

TradeNow = true;

}

if(ShortTrade)

if(fRSI_CSellLevel && (Bid- LastSellPrice) >= (PipStep*Point))

{

TradeNow = true;

}

may be changed to

if(LongTrade)

if(fRSI_C>BuyLevel && (LastBuyPrice - Ask) >= (PipStep*Point))

{

TradeNow = true;

}

if(ShortTrade)

if(fRSI_C= (PipStep*Point))

{

TradeNow = true;

}

The reason is with the condition in the current system, opportunity to open the additional trades would be missing, or with worse price.

Just my 2 cents.

Thank you!

Scott

Files:
 

Scott,

I think it is an avenue worth exploring. You can make that change in your code and see how it affects.

By the way, I still think random entry is the way to go. What we need is adequate capital to withstand the drawdowns.

With IBFX, trading nanolots and a reasonable capitalization for a few pairs maybe a way to test this system.

 

Hi Maji.

I can test your EA on my demo FXDD.

My mail - maximivanov@hotmail.com. Max.

 
Maji:
Scott,

I think it is an avenue worth exploring. You can make that change in your code and see how it affects.

By the way, I still think random entry is the way to go. What we need is adequate capital to withstand the drawdowns.

With IBFX, trading nanolots and a reasonable capitalization for a few pairs maybe a way to test this system.

Hi Maji,

Just made the change and continue the test.

With random entry, the first position is mostly in the wrong side, and will keep adding the positions. Seems the worse, the better if the account is enough big, and finally the more pips. To me, I would feel scared for it, looking at the statement member posted, the lots was sometimes up to a big number, for example 9.9. I would better to have first position as good as possible, in this case, I would have less chance to go very big lots. The nanolots with IBFX perhaps is good way to test. Do you have idea how much $ are suitable for one pair to be safe?

For the current system, if you think it opened too few positions, and made too few pips, perhaps, other oversold/bought indicators can be tried. I have tried Williams %R, the value >-20 for sell, and <-80 for buy, many more positions can be opened.

 

I will try Williams %R and see how it works out.

As for safe amount, let me make the calcs here.

Let us assume 1 mini lot, where 1 pip = $1. Consider we will go 10 trades deep, and starting with 1 lot and using Fibo sequence the total number of lots will be 1 + 2 + 3 + 5 + 8 + 13 + 21 + 34 + 55 + 89 = 231 lots. If we are buying at say at an interval of 50 pips, then we will now have a drawdown of around

1*50*10 + 2*50*9 + 3*50*8 + 5*50*7 + 8 *50*6+ 13*50*5 + 21*50*4 + 34*50*3 + 55*50*2 + 89*50*1=29250 pips. If you consider $100 to be the margin per lot, you will also need $23100. Thus, you will need atleast $29,250+$23,100 = $52,350. Please check my math.

Now, if you are using micro lots, and 1:400 leverage, I would think $5000 would be okay for each pair.

 
bluto:
To where shall I direct my cashier's check, sir?

Send me a private message and I'll let you know.

 

After struggling all day with this code.

It comes down to this...

I have two arrays which have duplicates in them which need to be combined into one list and the duplications eliminated.....sound familliar?

yea I havn't made much progress. I keep telling myself it should be simple, ya right?

 

what if eliminating multiple entries from the array wasn't so important?

The array right now as is, contains a concatenated value like: 12696.2 where the value to the right of the decimal = number of matches and the value to the left of the decimal = pricelevel*10000. This means that each entry records the price level and the number of matches at that level. So what if multiple entries occur? Is there a way to make use of the information and create a histogram despite the fact of these multiple entries?

 

I don't mean to be rude, so please don't take it that way. Let us keep this thread focussed on the cost averaging system.

I tried using CCI and Williams%R. These oscillators are too whippy, or atleast the system thinks so.