Coding help - page 215

 
manso1:
I have coded a simple ea that buy and sell at period breakout. but the problem is that it only opens buy orders and doesn't open sell orders(error message) .if you please help me to solve this . I have attached ea. thanks in advance

manso1

You can not use Ask price for open price when opening a sell order. It must be Bid.

PS: consider setting the take profit to greater than 10 points (on a 5 digit broker it will be just 1 pip). On most of the brokers you will not be able to set a take profit so tight

 
mladen:
dasio, That is a partial code that is using custom function and from it nobody can tell what does that code do.

mladen,

I think dasio wanted the attached indicator to show as a histogram. Possible?

Thank you.

Files:
 
hohgch:
mladen,

I think dasio wanted the attached indicator to show as a histogram. Possible?

Thank you.

hohgch

What would be the rules for the histogram?

 
mladen:
hohgch What would be the rules for the histogram?

As per Daiso's code I think. I am not proficient with programming. I think he got it from the book. The histogram is the same as the pivot range but displayed as a histogram to detect using pivot range, if the day will be a trending or ranging day.

#Indicator

#PARAM "UpperMarker",.75

#PARAM "MiddleMarker",.5

#PARAM "LowerMarker",.25

Dim fPivotrange As Single

fPivotRange = ((floor_piv(1)-floor_piv(-1))/floor_piv(0))*100

PlotHist("PRHIST",fpivotrange, 0,blue,3)

Plotlabel(UpperMarker)

Plotlabel(MiddleMarker)

Plotlabel(LowerMarker)

setscales(0,1)

Return 0

 

mladen,

can a divergence factor be coded for this indicator?

thank you.

Files:
vzo.mq4  4 kb
 
mladen:
person77 One more options added : AllowCloseEqualOpen. so you can control it with that option now

mladen - again thank you for the great work on this.

I have another option that I would like to have added to this Stoch_Indy-1.02,

the condition that, for a short signal, for example:

1 – the candle bodies of the last Y bars (Y is a user selectable variable, here 15 bars) must be within

2 – the lower channel of Z pips wide on the lower side of a Moving Average (Z a variable, here 20 pips, see the attached MA channel file, 100 EMA in these examples), and

3 – the lower channel can be a little higher than the MA itself, by X pips (a variable),

shown by distance CD in the first chart, from 2 pips above the green 100 EMA to the red dotted line lower channel, total of 22 pips.

The charts below show some examples of how this could produce mainly profitable trades, here GBPJPY.

 

Mladen, first of all, all the best to you and your family in 2014. Have a question for you, how can I normalize two indicators in separate window (first one it's in range -2/2 and second one is 0-100)?

Thank you in advance.

 
altoronto:
Mladen, first of all, all the best to you and your family in 2014. Have a question for you, how can I normalize two indicators in separate window (first one it's in range -2/2 and second one is 0-100)? Thank you in advance.

altoronto

No generally best way of normalization.

Try using "raw stochastic" (min/max normalization) or rsi, but any normalization will deform the original data

 

Hi mrTools hi malden

Can you please make some special thing for me i want tu joint all the indicators attached on one, i mean one arrow appears when minimum 2 arrows are on the same side (excuse my poor english) it must be minimum 2 arrows and if there is one on the opposite way it doesn t appear

Please just before the fsd indi shows lines can you remove theme and let only arrows and please i know i m exagirating with the fsd the arrow appears on the current bar can you make it appears the bar before

So normally i ll get only one arrow

By the way the are 2 iinwmarrows the one without alerts repaints can you fix it with the same parameters (3.3.3.3) even if it s wrong signal?

Thanks a lot and sorry for the request

imed

Files:
 

the rest of indis

this is the rest on the indis

Gracias

Files:
Reason: