[Archive!] Writing an advisor for free - page 27

 
Hello, please help me insert into my EA:

1. For example: when a sell position is opened. Profit goes into minus. The four hour bar closes above the upper green line. Sell is closed and buy is opened at the close of the bar.
when the buy position is open. Profit goes into minus . The 4hour bar closes below the red line. Buy closes and open sell on bar close.


2. At RefHour 8 and CloseHour 9, the ORDER CLOSES IN PLUS, parameters RefHour and CloseHour are automatically changed from 8 and 9 to 16 and 17.
At RefHour 16 and CloseHour 17,ORDER CLOSED IN PLUS, the parameters RefHour and CloseHour are automatically changed from 16 and 17 to 0 and 1.
At RefHour 0 and CloseHour 1, the ORDER CLOSE TO PLUS, automatically change the parameters RefHour and CloseHour from 0 and 1 to 8 and 9.


Please fix advisor .Thank you.
Files:
27_23.zip  54 kb
 
dpg03 писал(а) >>
Hello: Please help me insert into my EA:

1. For example : When a position is open sell. Profit goes into minus. Price reaches the upper green line. Sell is closed and buy is opened.
When the buy position is opened. Profit goes downwards. Price reaches the lower red line. Buy is closed and sell is opened.


2. At RefHour 8 and CloseHour 9, the ORDER CLOSES IN PLUS, automatically change the parameters RefHour and CloseHour from 8 and 9 to 16 and 17.
At RefHour 16 and CloseHour 17, the ORDER CLOSES IN PLUS, automatically change the parameters RefHour and CloseHour from 16 and 17 to 0 and 1.
At RefHour 0 and CloseHour 1, the ORDER CLOSE TO PLUS, automatically change the parameters RefHour and CloseHour from 0 and 1 to 8 and 9.


Please fix the adviser.


I have to remove the scream here too. I see only one letter in the monitor. It is not convenient to read.
 
and the iCustom function doesn't work on the tester or did I do something wrong?
 
miha-28 писал(а) >>
and the iCustom function doesn't work on the tester or did I do something wrong?


Maybe it's "I did something wrong".
It's working. And it works fine.
 

Afternoon )
Help in writing an advisor...

The conditions are as follows:

Buy - crossover of fast MA with slow MA from bottom to top
Sell - vice versa... A slow MA crosses a fast one from top to bottom

Something like this (I am not an expert, I may be wrong):

if (iMA(NULL, PERIOD_H1, 30, 0, MODE_EMA, PRICE_CLOSE, 1) > iMA(NULL, PERIOD_H1, 9, 0, MODE_EMA, PRICE_CLOSE, 1)
&& iMA(NULL, PERIOD_H1, 30, 0, MODE_EMA, PRICE_CLOSE, 0) < iMA(NULL, PERIOD_H1, 9, 0, MODE_EMA, PRICE_CLOSE, 0))

if (iMA(NULL, PERIOD_H1, 30, 0, MODE_EMA, PRICE_CLOSE, 1) < iMA(NULL, PERIOD_H1, 9, 0, MODE_EMA, PRICE_CLOSE, 1)
&&& iMA(NULL, PERIOD_H1, 30, 0, MODE_EMA, PRICE_CLOSE, 0) > iMA(NULL, PERIOD_H1, 9, 0, MODE_EMA, PRICE_CLOSE, 0))


Closing an open position:

If there was a buy, the MOMENTUM crosses the 100 signal line from top to bottom... i.e., the value is below 100...
If there was a Sell, the MOOMENTUM crosses the Signal Line 100 from the bottom to the top... i.e., the value becomes greater than 100...

Takeprofits and stops are not needed... for now... =))

In the properties of an EA I would like to set the lot, the periods of averages and momentum ... )

I would be very grateful for help!!!

 
Dear programmers I need to re-do Ilana 4 help the machine will get interesting by my settings it goes many months but some plummets
 

Zdrastvujte,jesli nezatrudnit napisite sovetnika po etomu indiuku.strategiju dumaju neobezatelno objasnet,tut i tak ponetno.

Files:
 

Hello. I've written an EA and am trying to test it since the beginning of 2009, it won't let me test it and writes this...

2010.04.30 23:21:09 TestGenerator: unmatched data error (high value 0.8767 at 2010.04.16 20:05 is not reached from the lowest timeframe, high price 0.8766 mismatches)

What can it be how to fix it?

 
Hello Sirs write the simplest code
in short, first open a position from the current price eg buy with tp = 30 sl = 30, then put an order
30 points above the open buy of the same lot with the same tp and sl
and 30 points below the open sell position in an amount twice larger than the previous lot with the same tp and sl
if open sell the same then at the rate of sell order with the same lot and in the opposite direction - x2
and need to make adjustable parameters tp and hence the distance at which orders are put
 
Guys,
Can you advise where to download the script to close open orders only buy or only sell?
The one here on this site closes all open orders for some reason.
I do not know what to do with it.
Reason: