Ask! - page 125

 

need help

can some one code an indicator count number of oscilation in each candel??????????????

 

datetime expire = D'2008.02.04 12:00';

if (TimeCurrent()>expire){

 
cja:
Hi ANCOLL

Good to hear from you again, I have just got back from the Christmas holidays and am ready to get back into it. I use this code I hope you find it works for you.

string Message="";

datetime expire = D'2008.02.04 12:00';

if (TimeCurrent()>expire){

Alert("Trial has ended. Please contact xxxx @ xxxx.com");

return(0);

}else {Message="Price Display Activated";}

ObjectDelete("Price_Account_Info");

ObjectCreate("Price_Account_Info", OBJ_LABEL,WindowFind("Price"), 0, 0);

ObjectSetText("Price_Account_Info",""+Message+" - Expires "+TimeToStr(expire)+"",8, "Tahoma", ForestGreen);

ObjectSet("Price_Account_Info", OBJPROP_CORNER, 3);

ObjectSet("Price_Account_Info", OBJPROP_XDISTANCE, 5);

ObjectSet("Price_Account_Info", OBJPROP_YDISTANCE, 5);

This code puts a message into the indicator window or chart window and an expiry into an Alert Box

This example puts a message into the indicator window or chart window and an expiry into the top left of the chart

datetime expire = D'2008.02.04 13:25';

if (TimeCurrent()>expire){

Comment("Trial has ended. Please contact xxxx @ xxxx.com");

return(0);

}else {Message="Price Display Activated";}

ObjectDelete("Price_Account_Info");

ObjectCreate("Price_Account_Info", OBJ_LABEL,WindowFind("Price"), 0, 0);

ObjectSetText("Price_Account_Info",""+Message+" - Expires "+TimeToStr(expire)+"",8, "Tahoma", ForestGreen);

ObjectSet("Price_Account_Info", OBJPROP_CORNER, 3);

ObjectSet("Price_Account_Info", OBJPROP_XDISTANCE, 5);

ObjectSet("Price_Account_Info", OBJPROP_YDISTANCE, 5);

This next example puts both the messages into Comments on the top left of the chart.

datetime expire = D'2008.02.04 13:25';

if (TimeCurrent()>expire){

Comment("Trial has ended. Please contact xxxx @ xxxx.com");

return(0);

}else {Comment("Price Display Activated");}

All of these codes make the indicator disappear when the expiry time is up

A simple indicator as an example posted below

price_display.mq4

cja

Updated below

 

Analysing forward testing

Hello to everybody,

in order to find out what an EA really does I did some back and then forwardtesting. When I compared the results there are differences in them. Two questions:

1. What might be reasons (parameters should be the same) and how to avoid this (MIG-Investments)

2. Where can I learn the meanings of the log files so that I can find out what is happening in forward testing?

Thanks

Fxkiss

 
fxkiss:
Hello to everybody,

in order to find out what an EA really does I did some back and then forwardtesting. When I compared the results there are differences in them. Two questions:

1. What might be reasons (parameters should be the same) and how to avoid this (MIG-Investments)

2. Where can I learn the meanings of the log files so that I can find out what is happening in forward testing?

Thanks

Fxkiss

EA did its job in both cases. The problem between back and forward test is the brokers manipulation.

FerruFx

 

EDIT below

 

Hi, could someone help me to modify PipMaker to a version that acts "im the mirror", so when we have a BUY to make a SEL and viceversa? I know it has the "reverse" option, but it didn't act exactly reverse, so I need it to have a buy signal and make a sell in "reverse mode true". I think it's very simple, but didn't manage to do it myself....

Thank's a lot

see post #1245

 

ea doesnt work

hi everybody , i hope someone could help me , im new in the coding feature and still learning, i just build an EA, it was working on my mt4 (MIG), then i switched to FxPro and they have fraccionary spread , and i keep getting the message 'orderSell error' ' error openning sell order' and then when i put my stop loss to 0.0 and my limit to 0.0 te EA will work , please any ideas to share?? sorry about my english , its not my first lenguaje. thanks.!!

 

I have an EA that places a trade on the next close bar and if I set a small TP and the trade closes then the EA will re-enter another trade because previous bar trade conditions are still met. I don't want the EA to open another trade, I want it to wait an hour then check trade condition again to stop it doing these re-entry trades. What code can I add to my EA to fix this re-entry issue?

Thank you

 
matrixebiz:
I have an EA that places a trade on the next close bar and if I set a small TP and the trade closes then the EA will re-enter another trade because previous bar trade conditions are still met. I don't want the EA to open another trade, I want it to wait an hour then check trade condition again to stop it doing these re-entry trades. What code can I add to my EA to fix this re-entry issue? Thank you

try this after the start function , its set to check for a signal every 30minutes , just change the period time. it works for me .

if(timeprev!= /*Time[0]*/ iTime(Symbol(),PERIOD_M30,0)) { //---- Check signal only once a bar m30