Coding help - page 520

 

sar different timeframe

Hi,

The following indicator (SAR for a superior timeframe, i.e. sar relative to a different timeframe; For example if I have opened 1 hour timeframe the indicator draw the 4 hour sar) when the market is closed it doesn't display anything.

It display only if I force a "chart refresh" by pressing left key in the chart the indicator is displayed correctly.

Is there anyway to solve this problem?

Files:
 

Step / Stop Expert with ATR Take Profit.

Hi pro-coders,

I wonder if someone could help. I am currently trying to implement an ATR Take Profit into the Step / Stop Expert.

I have prepared the code / idea, but I stuck.

Thank you in advance!

With kind regards,

T.

atr_stepstopexpert_v1.mq4

 
tfi_markets:
Step / Stop Expert with ATR Take Profit.

Hi pro-coders,

I wonder if someone could help. I am currently trying to implement an ATR Take Profit into the Step / Stop Expert.

I have prepared the code / idea, but I stuck.

Thank you in advance!

With kind regards,

T.

atr_stepstopexpert_v1.mq4

Replace

if(Bid-OrderOpenPrice()>=k*StepSize*Point)

{

BuyStop=OrderStopLoss()+StepSize*Point;[/CODE]

with

if(Bid-OrderOpenPrice()>=ATR)

{

BuyStop=OrderStopLoss()+ATR;[/CODE]

and

[CODE] if(OrderOpenPrice()-Ask>=k*StepSize*Point)

{

SellStop=OrderStopLoss()-StepSize*Point;

with

[CODE] if(OrderOpenPrice()-Ask>=ATR)

{

SellStop=OrderStopLoss()-ATR;
 

coders kindly assist. the trailing stop aint kicking in the EA

Files:
pow_2.00.mq4  7 kb
pow_2.00.ex4  8 kb
 
candyman752:
coders kindly assist. the trailing stop aint kicking in the EA

candyman752

What error do you get in run-time (int the experts or the journal tab of the terminal)?

 

Hello Mladen,

How are you?Hope everything is fine.Again i need your help .I have a pivot indicator which is very good.I guess i download it from here as usual .It calculates pivots from H1 to Monthly charts.But i need it to calculate intraday charts.I mean same calculation formula from M5 to H1' pivot points.I hope it is possible.Thnx in advance.Have plenty of pips.

pivot_points_-_history.mq4

 

I know it is too much but i am trusting your generosity.Is there any standard stochastic indicator which its %D signal line has two colour?I mean when it is rising for example green and when it is falling red.If there is not is it possible to code a new one?Hope i am clear enough.Thnx in advanced. Have plenty of pips.

 
mladen:
candyman752 What error do you get in run-time (int the experts or the journal tab of the terminal)?

errors are

1 possible loss of data

2 return value of order select should be checked

3 return value of order modify should be checked

 
candyman752:
errors are

1 possible loss of data

2 return value of order select should be checked

3 return value of order modify should be checked

Those are compiler warnings and all are benign

What I meant is what errors are written out in the experts and the journals tab of the terminal

 
mladen:
Replace
if(Bid-OrderOpenPrice()>=k*StepSize*Point)

{

BuyStop=OrderStopLoss()+StepSize*Point;[/CODE]

with

if(Bid-OrderOpenPrice()>=ATR)

{

BuyStop=OrderStopLoss()+ATR;[/CODE]

and

[CODE] if(OrderOpenPrice()-Ask>=k*StepSize*Point)

{

SellStop=OrderStopLoss()-StepSize*Point;

with

[CODE] if(OrderOpenPrice()-Ask>=ATR)

{

SellStop=OrderStopLoss()-ATR;

Hi dear Mladen,

thank you very much for your Suggestion. I have implemented the code as suggested.

Now it is not doing anything anymore, no Initial Stop, or take Profit.

Could you kindly review the attached EA?

Thank you in advance.