MAStopLossStrategy

Strategies are published here.

Moderator: admin

MAStopLossStrategy

Postby Apprentice » Thu May 17, 2018 4:47 am

MAStopLossStrategy.lua
(8.32 KiB) Downloaded 181 times

Based on the request.
viewtopic.php?f=27&t=66116

Short Trade
Close trade X pips in profit
On Price /MA CrossOver

Vice versa for Long
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 19186
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: MAStopLossStrategy

Postby alienmole » Fri May 18, 2018 4:19 am

Hi Thanks

However the strategy is not performing as intended. Currently it exits a trade when price crosses the 10 MA in the direction price is moving.

eg, at the moment if you are short and price is above the 10SMA and goes below it by the minimum amount, say 10 pips, then it exits.

What should happen is you are wanting an opposing bar type for the exit when the price is a certain amount of pips in profit, using the example of a short trade that would be a bar where the close is above the open, ie an "UP" Bar closing over the 10 MA and the opposite if you were Long.

Thanks
alienmole
 
Posts: 28
Joined: Tue Mar 06, 2018 10:24 am

Re: MAStopLossStrategy

Postby Apprentice » Fri May 18, 2018 5:22 am

Try it now.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 19186
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: MAStopLossStrategy

Postby alienmole » Fri May 18, 2018 5:33 am

Its exiting the trade on the touch of the MA, it should be a close of a bar back across the MA

Thanks
alienmole
 
Posts: 28
Joined: Tue Mar 06, 2018 10:24 am

Re: MAStopLossStrategy

Postby alienmole » Mon May 21, 2018 6:07 am

Hi

I've attached an image which should hopefully help explain the rules

1212.png


Thanks
alienmole
 
Posts: 28
Joined: Tue Mar 06, 2018 10:24 am


Return to Custom Strategies

Who is online

Users browsing this forum: Bing [Bot] and 6 guests