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

Macd Stochastic Fractal MA5/25 Daily Marylin
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1448
Page 75 of 141
Author:  bodleytunes [ Tue Jul 30, 2013 6:32 am ]
Post subject:  Re: Macd Stochastic Fractal MA5/25 Daily Marylin

Interesting, my AUDJPY trades closed this morning automatically at 3am with the neipce set file.

But the OOTB ones were still open, so I closed them anyway as they were making decent pippage.
Author:  dudest [ Tue Jul 30, 2013 8:23 am ]
Post subject:  Re: Macd Stochastic Fractal MA5/25 Daily Marylin

My AUDJPY short also closed today morning (Unified set) in profit, good stuff

I had a previous AUDJPY long that thankfully was closed before it got very out of hand ( ~100 pips loss )

EURJPY + CHFJPY shorts and EURUSD long soldiering on....

Cheers
Author:  bodleytunes [ Tue Jul 30, 2013 9:47 am ]
Post subject:  Re: Macd Stochastic Fractal MA5/25 Daily Marylin

Just got a GBPUSD short earlier with the unified set file...
Author:  dudest [ Tue Jul 30, 2013 1:03 pm ]
Post subject:  Re: Macd Stochastic Fractal MA5/25 Daily Marylin

I don't have GBPUSD in my watchlist...( I don't remember why now... )

I know I don't have XAUUSD coz the Unified set can't handle Gold, needs its own set (haven't had the time to analyse )

Is this the first GBPUSD trade that the Unified has taken? Anyone else running GBPUSD on Unified (with good results)?

Cheers
Author:  bodleytunes [ Tue Jul 30, 2013 3:54 pm ]
Post subject:  Re: Macd Stochastic Fractal MA5/25 Daily Marylin

dudest wrote:I don't have GBPUSD in my watchlist...( I don't remember why now... )

I know I don't have XAUUSD coz the Unified set can't handle Gold, needs its own set (haven't had the time to analyse )

Is this the first GBPUSD trade that the Unified has taken? Anyone else running GBPUSD on Unified (with good results)?

Cheers
Yeah around the 12th of July mine opened a load of GBPUSD and made a lot of money (demo).

Just been watching AUDJPY and its continued to go down in price since the closing. :twisted: :D
Author:  phil_trade [ Tue Jul 30, 2013 5:12 pm ]
Post subject:  Re: Macd Stochastic Fractal MA5/25 Daily Marylin

milanese wrote:Hi Phil,

some days ago I found your thread and felt interested. I am since years professional trader and a freelance coder for webapp, sure I am a lazy mql4 coder.., but I want contribute with one bugfix in StochOBOSToMoveSL function that I made, after I found error messages in log, sure it is only a fast fix and with it I changed somewhat the idea, now StochOBOSToMoveSL sets an BE that is free configurabile i had in BT with GU good results ..
Maybe you find the attched V usefull...

Congrats for this tradestragie it is really great :)

Sorry for my english but as Italian I am not so good in english but much much worser is my french...

Cheers and always good trades

Tommaso
Hi Niepe

Just receive this mail from Tommaso, who is to shy to post himself :oops: Many thanks Tommaso !

Could you please look at his debug version ?

thks

Philippe
Author:  milanese [ Tue Jul 30, 2013 8:10 pm ]
Post subject:  Re: Macd Stochastic Fractal MA5/25 Daily Marylin

phil_trade wrote:
milanese wrote:Hi Phil,

some days ago I found your thread and felt interested. I am since years professional trader and a freelance coder for webapp, sure I am a lazy mql4 coder.., but I want contribute with one bugfix in StochOBOSToMoveSL function that I made, after I found error messages in log, sure it is only a fast fix and with it I changed somewhat the idea, now StochOBOSToMoveSL sets an BE that is free configurabile i had in BT with GU good results ..
Maybe you find the attched V usefull...

Congrats for this tradestragie it is really great :)

Sorry for my english but as Italian I am not so good in english but much much worser is my french...

Cheers and always good trades

Tommaso
Hi Niepe

Just receive this mail from Tommaso, who is to shy to post himself :oops: Many thanks Tommaso !

Could you please look at his debug version ?

thks

Philippe
Hi Phil,

it is just in early impression after some fast study of this faszinating EA.. just an idea .. :) because I saw in backtesting a lot of errors, when MoveSLOnStoch atempted to move the SL, I changed the logic so a bit I know, but for me makes sense with BE...


Cheers

Tommaso
Author:  niepce [ Wed Jul 31, 2013 7:25 am ]
Post subject:  Re: Macd Stochastic Fractal MA5/25 Daily Marylin

Errors, bugs, lots of them :-)
Im checking... after cofee :)
Million thanks Tommaso !
Author:  milanese [ Wed Jul 31, 2013 7:45 am ]
Post subject:  Re: Macd Stochastic Fractal MA5/25 Daily Marylin

niepce wrote:Errors, bugs, lots of them :-)
Im checking... after cofee :)
Million thanks Tommaso !
cafè what good idea :)
no reason to thanks I saw that my intervention the modify error issue not 100% resolved.. maybe together we will find the problem..

Cheers

Tommaso
Author:  niepce [ Thu Aug 01, 2013 6:36 am ]
Post subject:  Re: Macd Stochastic Fractal MA5/25 Daily Marylin

Couple of comments on Tommaso's changes :

- This might be needed in the init() routine :

Code: Select all

BreakEvenProfit*=multiplier;
- Before change

Code: Select all

		if (OrderType() == OP_BUY)
		{   if (OrderMagicNumber() == nMagic)
			if (OrderSymbol() == strSymbol)
			if (iStochastic(strSymbol,PERIOD_OSC,10,3,3,MODE_SMA,1,MODE_SIGNAL,0)>StochOBOSToMoveSL)
			if (iStochastic(strSymbol,PERIOD_OSC,10,3,3,MODE_SMA,1,MODE_MAIN,0)<iStochastic(strSymbol,PERIOD_OSC,10,3,3,MODE_SMA,1,MODE_SIGNAL,0))
			{
			   if(UseHighLowCalcForMoveSLOnStoch==true)
			   {
			      NewSL=ReturnLowOpenPrice(strSymbol,MagicNumber,OrderTicket());
			   }
			   else
			   {
			      NewSL=ReturnHighOpenPrice(strSymbol,MagicNumber,OrderTicket());
			   }
			   
				NewSL=ReturnHighOpenPrice(strSymbol,MagicNumber,OrderTicket());
				if((Bid-NewSL)>(DeltaPipsMoveSLOnStoch*Point))
				{
					if(         ((NewSL>OrderStopLoss())||(OrderStopLoss()<(1*Point))) &&   (NewSL!=0) && (NewSL < Bid - (10*multiplier*Point))   )
					{
						//OrderModify(OrderTicket(),OrderOpenPrice(),NewSL,OrderTakeProfit(),0,CLR_NONE);
						Alert("MoveSLOnStoch :Attempting to move SL of ",strSymbol," to ",NewSL);
						Print("MoveSLOnStoch :Attempting to move SL of ",strSymbol," to ",NewSL);
						ModifyOrder(OrderTicket(),NewSL,0);
					}
				}
			}           
			
			
		} 
After change

Code: Select all

		if (OrderType() == OP_BUY)
		{   if (OrderMagicNumber() == nMagic)
			if (OrderSymbol() == strSymbol)
			if (iStochastic(strSymbol,PERIOD_OSC,10,3,3,MODE_SMA,1,MODE_SIGNAL,0)>StochOBOSToMoveSL)
			if (iStochastic(strSymbol,PERIOD_OSC,10,3,3,MODE_SMA,1,MODE_MAIN,0)<iStochastic(strSymbol,PERIOD_OSC,10,3,3,MODE_SMA,1,MODE_SIGNAL,0))
			{
			   
			   
				NewSL= NormalizeDouble(OrderOpenPrice()+(BreakEvenProfit*Point), Digits);
				if((Bid-NewSL)>(DeltaPipsMoveSLOnStoch*Point))
				{
					if(         ((NewSL>OrderStopLoss())||(OrderStopLoss()<(1*Point))) &&   (NewSL!=0) && (NewSL < Bid - (10*multiplier*Point))   )
					{
						//OrderModify(OrderTicket(),OrderOpenPrice(),NewSL,OrderTakeProfit(),0,CLR_NONE);
						Alert("MoveSLOnStoch :Attempting to move SL of ",strSymbol," to ",NewSL);
						Print("MoveSLOnStoch :Attempting to move SL of ",strSymbol," to ",NewSL);
						ModifyOrder(OrderTicket(),NewSL,0);
					}
				}
			}           
			
			
		}   
My understanding is that the original code, at least what it's supposed to be in the case of a long order, is to move the stop loss to breakeven for the highest open price for a bunch of orders.
Say you have 3x longs EURUSD, opened at 1.20, 1.25, and 1.30. When the stochastic enter in overbought, it will move the SL to 1.30.

After Tommaso's change, my understanding is that each order SL will separately be set to BE (+BreakEvenProfit pips). Say your BreakEvenProfit is set to 50 pips, SLs will be set as follows : 1.205, 1.255, and 1.305.

Do I get it right ?
All times are UTC Page 75 of 141