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

 
casperskii писал(а) >>

Hi! Remember i asked you for help? if it's not too much trouble, can you give me more tips? what you did for me back then is what i wrote now (i wanted the indicator to show the closest timeframes in one window!) this is what????

Hi, what's screwing up there, you tell me, I'll try to fix it. I did not understand your request.

 

Can someone write the following script: to place a pending order on the current candle and bind it to some line, either drawn arbitrarily or included in some planner? The script should work like this: we drag the script onto a chart and immediately select the necessary line. The script immediately binds to it, determines whether the line is above or below price (on the current candle) and opens the appropriate trade offer, i.e., buy stop (if the line is above) or sell stop(if it is below). If the price did not reach the position on this candlestick, then on the next candlestick the script modifies the opening price of the position using the same line. The settings specify in what points from the line the order is opened, and separately for buy stop and sell stop. The script is deleted in 2 cases
a) the order is triggered or
b) the order is deleted manually.
If there is already a pending order on the pair, the script should modify it and not open a new one. However, it can be (if possible) specified in the script settings.
The point of the script is to track the line by warrant and enter the market at its breakdown.

Please contact us if you need any details.

 
vtoroe_dyxanie >> :

This indicator doesn't use buffer to output graphical information, it uses ObjectCreate (create object), it creates objects, in your case "Trend line. They have a name (you always write it in quotes); open the file in the compiler and look at the line ObjectCreate("TL1",OBJ_TREND,0,T2,PP+Step*AB,T1,PP); Green is the name of the object. You cannot run the second indicator while you run the first one, because their names will be the same (I think so, I'm not confused - I'm a beginner :( ), so you need to change the names of objects in the second indicator. Changed, in the trailer.

Hi! Tell me if you can change this parameter-

#property indicator_separate_window ? if so what kinds are there.

 

Hi! Who can make such an EA the description is attached, Thanks in advance.

Basic trading rules According to the martingale method
When BuyStop of the first order triggers, the system should increase the number of lots for SellStop (see money management). To do this, it is better to delete the pending order
and set it anew with the new parameters.
so the system does this automatically without my intervention.
If the first SellStop order is triggered at the beginning, the number of lots of the pending BuyStop order is changed accordingly
.

Placement of Stop Loss SL and Take Profit TP: When opening
BuyStop and SellStop positions simultaneously, SL and TP are placed at the calculated levels you specify.

When the TP is triggered a pending order on this pair is deleted for
in the opposite direction. For example: a BuyStop triggered by TP is deleted
SellStop on this pair.

When the SL is triggered a pending order is opened on this pair for
in the opposite direction. For example: BuyStop is triggered by SL, immediately
opens a SellStop on this pair.

After the pending order triggering, say SellStop, a BuyStop pending order is set
on the same level where
was set before SL triggered.
If BuyStop is triggered, SellStop is set accordingly at the same level
as it was set before before the SL was triggered.
But the number of lots for this order should be increased. (See
below for money management).

Money Management: The level of profit, and therefore risk, is determined by
independently, according to the money management rules and in accordance with
with the size of Our deposit. A lot escalation scheme is used to maximise potential profit
and offset previous losses.

*Number of lots in orders (at 0.1L min):
1 profit level (min): 0.1, 0.1, 0.2, 0.4, 0.8, 1.6, :
2 profit level: 0.1, 0.2. 0.3, 0.6, 1.2. 2.4, ...
3 profit level: 0.1, 0.2. 0.4, 0.7, 1.4. 2.8, ...
4 profit level: 0.1, 0.2. 0.4, 0.8, 1.5. 3.0, ...
5 profit level (max): 0.1, 0.2, 0.4, 0.8, 1.6, 3.2, :


About Trading Strategy: At first glance, this strategy seems simple. However
is not.

Trading signal example:

AUDUSD/0.1/12.02.08/19:20/BS/0.9070/SL=0.9010/ TP=0.9130
AUDUSD/0.1/12.02.08/19:20/SS/0.9010/SL=0.9070/ TP=0.8950

Accordingly, if one of the orders triggered, set
Same orders but with increasing lot specified in the settings.

AUDUSD/0.2/12.02.08/19:20/BS/0.9070/SL=0.9010/ TP=0.9130
AUDUSD/0.2/12.02.08/19:20/SS/0.9010/SL=0.9070/ TP=0.8950

or

USDCAD/0.1/12.12.2007/05:55/Buy Stop/1.0140/SL=1.0100/TP=1.0180
USDCAD/0.1/12.12.2007/05:55/SellStop/1.0100/SL=1.0140/TP=1.0050

Входные параметры:

BuyStopPrice - 0. Only enter the price of Buy Stop order, the system should do the rest.
Set Stop Loss & Take Profit levels automatically. Also set a Sell Stop order.
TimeFrame = 60 only with this timeframe.
OrdersLevel = 40. This is the difference between the price and the stop loss. I.e. when I determine the level myself, I only set BuyStopPrice to 0. Enter only the price of Buy Stop order, and OrdersLevel =40. And once again I must point out that everything else the system has to do by itself.

for example

USDCAD/0.1/12.12.2007/05:55/Buy Stop/1.0140/SL=1.0100/TP=1.0180
USDCAD/0.1/12.12.2007/05:55/Sell Stop/1.0100/SL=1.0140/TP=1.0060

This means that the order opening level =40. Every time we define a new level, we must set this parameter.
Magic_N = 444, but for each pair for which we will connect the system
must be a different number, i.e. 444, 445, 446, 447, :.
CountOrders = 10. Number of orders opened by the Expert Advisor for one currency pair
.
Show_Alerts = true if we want to be notified visually and audibly on the monitor when orders are opened. And false if we don't want to receive alerts on the monitor.
Lots_1 = 0.1 Number of lots for the first order.
Lots_2 = 0.2 Number of lots for the second order, etc...
Lots_10

The system should automatically open positions on a real account according to the instructions laid down at
.

It should work with the Murray levels indicator Math-System-Trader and trigger BuyStop, SellStop signals using Murray levels every time after the profit trade as soon as the price is between the levels again.

 
Help in writing an advisor with the following input data
Files:
 

Who will write an EA based on my algorithm?

 
onetiger >> :

Hello, who can make such an EA, the description is attached.


It should work with the Levels indicator Murray Math-System-Trader, every time after a profitable deal as soon as the price is between the levels again to trigger signals BuyStop, SellStop on levels of Murray.

If I understand correctly, without the Murray indicator, everything else is implemented in the so-called Cheburashka advisor on the Alpari website.

http://forum.alpari.ru/thread42142-121.html

Only there you have to enter the first price yourself, and the advisor just follows the martingale that we set.

Request to modify it for different conditions remained without understanding :(

 
casperskii писал(а) >>

Hi! Can you change this parameter-

#property indicator_separate_window ? if so, what types are available?

In each MQL4 program you can specify additional specific parameters #property, which help the client terminal to serve the programs correctly without launching them explicitly. This concerns first of all the external indicator settings.

#property identifier value

Constant Type Description
link string link to manufacturer's website
copyright string manufacturer's name
stacksize int stack size for recursive calls
library library; no start function is assigned, functions that are not called from other functions are not removed
indicator_chart_window void display indicator in the chart window
indicator_separate_window void output the indicator in a separate window
indicator_buffers int number of buffers to calculate the indicator, up to a maximum of 8
indicator_minimum double lower limit of the scale of a separate indicator window
indicator_maximum double upper scale limit of a separate indicator window
indicator_colorN color colour for N line output, where N is from 1 to 8
indicator_widthN int line width N, where N is from 1 to 8
indicator_styleN int line style N, where N is from 1 to 8
indicator_levelN double horizontal N level in a separate indicator window, where N is from 1 to 8
indicator_levelcolor color indicator horizontal levels colour
indicator_levelwidth int thickness of horizontal levels of the indicator
indicator_levelstyle int indicator_levelstyle
show_confirm void show confirmation window before starting the script
show_inputs void Display the properties window before the script starts and disable the confirmation window

 
Please give me a link to a stochastic EA (only two parameters: crossover with signal line and crossover with levels, no other parameters)
 
maksmi12 >> :
Please give me a link to a stochastic EA (only two parameters: crossover with signal line and crossover with levels, no other parameters)

Last post on this page. But there are no levels there (only crossing lines).

You can insert levels yourself - it takes 3 minutes of work... All the more so, the entry conditions already provide for levels (recommended). You just need to add them to global parameters.

'experts'

//---------проверяем условие на покупку----------------------------
  if   (  /*(Stochastic_1<low_lim)  &&
          (Stochastic_0>low_lim)  &&*/
          ( StochK_1< StochD_0)  &&
          ( StochK_0> StochD_0)  )
  
//--------проверяем условие на продажу------------------------------
  if  ( /*(Stochastic_1>up_lim)  &&
          (Stochastic_0<up_lim)  &&  */
          (_StochK_1>_StochD_0)  &&
          (_StochK_0<_StochD_0))