stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Multi 10:4 Trader EA
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1619
Page 41 of 160
Author:  slipshod [ Tue Mar 26, 2013 2:02 pm ]
Post subject:  Re: Multi 10:4 Trader EA

MrLong wrote:Where did the name come from by way?
My need to wear warm slippers while trading/programming, even in the peak of summer ;)

Code: Select all

    for (int cc = 0; cc < ArraySize(Pivots); cc++)
    {
        if (askPrice > Pivots[cc] && askPrice < Pivots[cc + 1] &&  askPrice < top) 
        {
            pivot = NormalizeDouble(Pivots[cc + 1], digits);
         
           if (askPrice - pivot < (MinimumToNextSR / PFactor(symbol))) 
              pivot = NormalizeDouble(Pivots[cc + 2], digits);
            return(pivot);
        } 
    }    
}


No this looks correct to me, because we are looking for a LONG trade, ASK would be high and pivot would be low.
I have to ask ... are you sure? Lets imagine askPrice is 1.0, Pivots[cc] is 0.9 and Pivots[cc+1] is 1.1. We know that askPrice is less than Pivot[cc+1] as the controlling if() statement tests for it.

So, pivot is set to Pivots[cc+1], hence its 1.1. In the statement "if (askPrice - pivot < blah)" it'll always evaluate to true, as 1.0 - 1.1 = -0.1

Therefore the statement "pivot = NormalizeDouble(Pivots[cc+2], digits)" will always be executed ... and there's no checking to see if cc+2 < ArraySize(Pivots). By the same token in the Support function it could end up referencing Pivots[-1].
Author:  MrLong [ Tue Mar 26, 2013 2:09 pm ]
Post subject:  Re: Multi 10:4 Trader EA

slipshod wrote:
MrLong wrote:Where did the name come from by way?
My need to wear warm slippers while trading/programming, even in the peak of summer ;)

Code: Select all

    for (int cc = 0; cc < ArraySize(Pivots); cc++)
    {
        if (askPrice > Pivots[cc] && askPrice < Pivots[cc + 1] &&  askPrice < top) 
        {
            pivot = NormalizeDouble(Pivots[cc + 1], digits);
         
           if (askPrice - pivot < (MinimumToNextSR / PFactor(symbol))) 
              pivot = NormalizeDouble(Pivots[cc + 2], digits);
            return(pivot);
        } 
    }    
}




No this looks correct to me, because we are looking for a LONG trade, ASK would be high and pivot would be low.
I have to ask ... are you sure? Lets imagine askPrice is 1.0, Pivots[cc] is 0.9 and Pivots[cc+1] is 1.1. We know that askPrice is less than Pivot[cc+1] as the controlling if() statement tests for it.

So, pivot is set to Pivots[cc+1], hence its 1.1. In the statement "if (askPrice - pivot < blah)" it'll always evaluate to true, as 1.0 - 1.1 = -0.1

Therefore the statement "pivot = NormalizeDouble(Pivots[cc+2], digits)" will always be executed ... and there's no checking to see if cc+2 < ArraySize(Pivots). By the same token in the Support function it could end up referencing Pivots[-1].
Yes Sir, you are correct, well spotted.
Author:  MrLong [ Tue Mar 26, 2013 2:39 pm ]
Post subject:  Re: Multi 10:4 Trader EA

Baluda wrote:@MrLong, @Simplex,

Minor issues in 'Multi_10_4_EAv1.08rsi_stoch_JM':
  • headerStr[4] should be changed when UseRSIInsteadOfStoch is set to true. 'Stoch'-> 'RSI'
  • The color of the RSI value in UpdateGrid should follow the values of RSITMAhighlevel and RSITMAlowlevel
Paul

Thanks Paul.
Author:  simplex [ Tue Mar 26, 2013 2:51 pm ]
Post subject:  Re: Multi 10:4 Trader EA

Baluda wrote:@MrLong, @Simplex,

Minor issues in 'Multi_10_4_EAv1.08rsi_stoch_JM':
  • headerStr[4] should be changed when UseRSIInsteadOfStoch is set to true. 'Stoch'-> 'RSI'
  • The color of the RSI value in UpdateGrid should follow the values of RSITMAhighlevel and RSITMAlowlevel
Paul
Thank you, Baluda!

Fixed that:

line 380 ff:

Code: Select all

if ( UseRSIInsteadOfStoch )
	headerStr[JSTOCH] = "RSI";
else
	headerStr[JSTOCH] = "Stoch";
line 2791 ff:

Code: Select all

if (RSITMA > RSITMAhighlevel)
	ObjectSetText ( sObj, sTxt, fontSize, displayfont, BearishColor);
else if (RSITMA < RSITMAlowlevel)
	ObjectSetText ( sObj, sTxt, fontSize, displayfont, BullishColor);
else
	ObjectSetText ( sObj, sTxt, fontSize, displayfont, whiteColor);
@MrLong: will you integrate that in v 1.09?

I will also upload a new version of my modified 1.08 in my yesterday's post.

Best wishes, Jürgen
Author:  McNish [ Tue Mar 26, 2013 2:54 pm ]
Post subject:  Re: Multi 10:4 Trader EA

slipshod wrote:My need to wear warm slippers while trading/programming, even in the peak of summer ;)
I've heard slippers to assist in acupressure but warm slippers in peak of summer!!! What species your are my friend. :lol:

Jokes apart, is it for some ailment? Regards, :)
Author:  MrLong [ Tue Mar 26, 2013 2:59 pm ]
Post subject:  Re: Multi 10:4 Trader EA

simplex wrote:
Baluda wrote:@MrLong, @Simplex,

Minor issues in 'Multi_10_4_EAv1.08rsi_stoch_JM':
  • headerStr[4] should be changed when UseRSIInsteadOfStoch is set to true. 'Stoch'-> 'RSI'
  • The color of the RSI value in UpdateGrid should follow the values of RSITMAhighlevel and RSITMAlowlevel
Paul
Thank you, Baluda!

Fixed that:

line 380 ff:

Code: Select all

if ( UseRSIInsteadOfStoch )
	headerStr[JSTOCH] = "RSI";
else
	headerStr[JSTOCH] = "Stoch";
line 2791 ff:

Code: Select all

if (RSITMA > RSITMAhighlevel)
	ObjectSetText ( sObj, sTxt, fontSize, displayfont, BearishColor);
else if (RSITMA < RSITMAlowlevel)
	ObjectSetText ( sObj, sTxt, fontSize, displayfont, BullishColor);
else
	ObjectSetText ( sObj, sTxt, fontSize, displayfont, whiteColor);
@MrLong: will you integrate that in v 1.09?

I will also upload a new version of my modified 1.08 in my yesterday's post.

Best wishes, Jürgen
Yes, will do.

This EA is doing very well again today, +1.10% up on todays trades. 8-)



Many Thanks
Author:  roman101 [ Tue Mar 26, 2013 3:23 pm ]
Post subject:  Re: Multi 10:4 Trader EA

Hi
can someone please let me know, when pending orders get deleted. Do I delete those manually or ea will do this. How often they get refreshed, once a day or once a week?
Author:  mobthehop [ Tue Mar 26, 2013 3:28 pm ]
Post subject:  Re: Multi 10:4 Trader EA

Moin J (simplex)

I so wish we could search for given post with attachments here ..... (SH if you are reading this....! lol)

Could you copy this link in your signature, so that we find your post back:
http://www.stevehopwoodforex.com/phpBB3 ... 887#p49887

'Tschuess Mop
Author:  roman101 [ Tue Mar 26, 2013 3:46 pm ]
Post subject:  Re: Multi 10:4 Trader EA

Wkcfx wrote:
MrLong wrote:
I've been down the road before, where we add this and add that, before long the EA is not what it started out to be, I've tried all the strength stuff before and for me it never worked, if you look at a chart and see that when price is below the Monthly 2ma, it continues, we just have to be patient, the EA is working fine, so why change it, but I do valid your idea's.

If price pulls back and the condition is correct to place orders, the EA will do what you are asking.

Best Regards
Andy



Best Regards
Andy

Thanks MrLong and all who are working so hard on this. After sorting out my CPU issue, thanks Slipshod, Snailbeard and all, i kicked off 1.08 Stoch/RSI Monday AM Asia, results attached.

All the Best
Bill
Hi Bill,
can you please share this monitor program.
Best regards

Roman
Author:  simplex [ Tue Mar 26, 2013 3:46 pm ]
Post subject:  Fixed one more issue ...

Hi all,

found and fixed another issue in UpdateGrid() - see line 2800 ff:

Code: Select all

		int dRunningTrades 			= RunningTrades (Pairs[y]);
		int dProcessTradesBuy 		= processTrades (Pairs[y], OP_BUY);
		int dProcessTradesBuyStop	= processTrades (Pairs[y], OP_BUYSTOP);
		int dProcessTradesSell 		= processTrades (Pairs[y], OP_SELL);
		int dProcessTradesSellStop = processTrades (Pairs[y], OP_SELLSTOP);
		int dCorrelatedSellingH4	= isCorrelatedSelling(Pairs[y], PERIOD_H4);
		int dCorrelatedBuyingH4		= isCorrelatedBuying (Pairs[y], PERIOD_H4);
		if ( dRunningTrades > 0) {
			sObj = sSig + 4 + y;
			if ( dProcessTradesBuy > 0 && dCorrelatedSellingH4 > dCorrelatedBuyingH4)
				ObjectSetText ( sObj, "L", fontSize + 4, "Wingdings", BearishColor);
			else if ( dProcessTradesSell > 0 && dCorrelatedSellingH4 < dCorrelatedBuyingH4)
				ObjectSetText ( sObj, "L", fontSize + 4, "Wingdings", BearishColor);
			else
				ObjectSetText ( sObj, "J", fontSize + 4, "Wingdings", BullishColor);
		}
Did not affect trading, just grid display. Initializitions of most integers were inside first 'if' ... could not work correctly.

Will exchange my v1.08 now.

Best wishes, Jürgen
All times are UTC Page 41 of 160