Reply

why the ea only open sell orders and loss money?

4 replies

ftkensin

Customer, bbp_participant, 17 replies.

Visit profile

2 years ago #276614

Hi,I learned a set of trading methods from a creator’s video as below and made it ea .
But there are many problems in the mt5 backtesting, which is different from the test results in the video.
For example, the test results has only short transactions and the test report shows that it is a loss of money.
I know it must be caused by not understanding coding, please help me to see what needs to be modified by Algowizard.

The strategy is simple as the following: ( XAUUSD,M15 at the mainchart.)
BUY order: The current price is above the ATR pressure line and the RSI is below 40. ( ATR pressure line: The daily opening price + 0.4 * ATR (day))
TP: order enter price + 4 * ATR(M15)
SL: ATR support line
Trailing stop : ATR support line of the day (because during an uptrend the support line of the day will also be raised)

SELL order: The current price is below the ATR support line and the RSI is above 60. ( ATR support line: The daily opening price – 0.4 * ATR (day))
TP: order enter price – 4 * ATR(M15)
SL: ATR pressure line
Trailing stop : ATR pressure line of the day

My algowizard setting and mq5 file are in the attachments.

Attachments:
You must be logged in to view attached files.

1

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

2 years ago #276688

Hello,
thanks, I will check your EA and let you know

1

ftkensin

Customer, bbp_participant, 17 replies.

Visit profile

2 years ago #276712

1.When I replace the function”>=” in the exit method with “crosses above”, the long order can enter the market. But I’m not sure what is the difference between “>=” and “crosses above”? And why does this replacement work? I thought these 2 ways are similar, can you give me an example to help me identify the difference ?Thanks.

2.I found that the EntrySignal method I set is not equal to the left and right sides of the sentence. I should add “ConvertPipstoPrice” to the right side so that it will show in price  as the left side of the sentence. Can you check if I am right about this? Thanks.

 

 

1

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

2 years ago #276764

Hello,

the cross above/below function compares last 2 values of both outputs … in your case you say that you want the trigger exactly when Close price crosses Open – xATR 

While when using the <= sign you say that at any bar that Close < OpenD – xATR the trade trigger is valid and will be processed

I am also not sure about the exit condition how to grasp properly. Generally you should avoid using the [0] with indicators. You can refer to current bar prices such as Open[0], OpenD[0], Close[0] – being the Last price … ATR value will be misleading

As far as I understand your logic I cannot see the ConvertPipstoPrice function useful

1

ftkensin

Customer, bbp_participant, 17 replies.

Visit profile

2 years ago #276766

Thanks for answer the question!

But still want to discuss the “ConvertPipstoPrice” function.

If Close price crosses OpenD[1] – ATR ,then enter the market with sell order.

“Close” and “OpenD[1]”  expresses in price but “ATR” is just a number, shouldn’t I change it to ” “ConvertPipstoPrice(ATR)” ?

For example , Close=1998.00 and OpenD[1]=2004.00,  ATR=50

If I use ConvertPipstoPrice(ATR) will it convert 50 pips to be “5” in price for XAUUSD?

Then 1998 crosses below 2004-5=1999 will enter the market.

Can you check if I am right about the above? Thanks again.

1

Viewing 4 replies - 1 through 4 (of 4 total)