[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 32

 
AndreyZak:

Hello, could you tell us how to correctly implement the following condition: We take the high of the candle and place a SellStop order with a stop and takeout 50 pips below it. Then if the order is open and the high updated (no matter at this candle or several candles later), we modify SellStop calculated - below 50 points from the new high with a stop and take. And so on, until the order becomes Sell. The order should be modified, rather than deleted and opened a new one! Thank you.

Redo the normal trawl function, so that it moves the pending order rather than the stop.
 

ind1= iCustom(NULL, 0,"indikator",0,0);

there are 3 colours in the indicator, but only red and green are required for calculations

#property indicator_buffers 3
#property indicator_color1 Sienna
#property indicator_color2 Green
#property indicator_color3 Red

int init() {
SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 2);
SetIndexStyle(1, DRAW_ARROW, STYLE_SOLID, 2);
SetIndexArrow(1, 159);
SetIndexStyle(2, DRAW_ARROW, STYLE_SOLID, 2);
SetIndexArrow(2, 159);
SetIndexBuffer(0, g_ibuf_104);
SetIndexBuffer(1, g_ibuf_108);
SetIndexBuffer(2, g_ibuf_112);
IndicatorDigits(4);
return (0);
}

Is it possible to bind the opening of an order to the colour of the indicator, red sell, green buy


 
vilard:

ind1= iCustom(NULL, 0,"indikator",0,0);

there are 3 colours in the indicator, but only red and green are required for calculations

#property indicator_buffers 3
#property indicator_color1 Sienna
#property indicator_color2 Green
#property indicator_color3 Red

int init() {
SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 2);
SetIndexStyle(1, DRAW_ARROW, STYLE_SOLID, 2);
SetIndexArrow(1, 159);
SetIndexStyle(2, DRAW_ARROW, STYLE_SOLID, 2);
SetIndexArrow(2, 159);
SetIndexBuffer(0, g_ibuf_104);
SetIndexBuffer(1, g_ibuf_108);
SetIndexBuffer(2, g_ibuf_112);
IndicatorDigits(4);
return (0);
}

Is it possible to bind the opening of an order to the colour of the indicator, red sell, green buy



Take data from first and second buffer:

ind1= iCustom(NULL, 0,"indikator",1,0);
ind2= iCustom(NULL, 0,"indikator",2,0);
 
charter:


Take the data from the first and second buffer:

if I take the data from the first and second buffer, will - not the Sienna colour be used?

need red and green

 
vilard:

if I take the data from the first and second buffer, will the Sienna colour not be used?

I need red and green


That would be 1 - Green, 2 - Red.
 
charter:

That would be 1 - Green, 2 - Red.

i.e. buffer numbering goes from "0"?
 
vilard:

i.e. buffer numbering goes from "0"?

Yes.
 
charter:

Yes.

Thank you
 
Hello, is there a script or indicator to monitor the level of the account balance and give a signal when a certain level of total profit or loss of all trades is reached?
 
rainsteel:
Hello, I have a question: Is there a script or an indicator that monitors the account balance and gives a signal when the total profit or loss of all trades reaches a certain level?

The built-in AccountBalance() function can do this.
Reason: