Hello!
I am kindly asking somebody knowleadgeable enough to help me debug this EA of mine.
The function TradeOncePerBar (GV TradedThisBar_) is not working properly - when EA is attached to Chart (ex. at recompiling) it will open new position, if signaled, on same Bar.
Would be also very handy if EA had 'button' for CLEAR CHART, that would delete Arrows and their connection lines (Chart -> Object List -> Name -> #) from opened and closed trades.
Also not shure if this piece of Code would work:
if (crossedLine ("trade all"))
{
GlobalVariableSet ("TradedThisBar_" + Symbol(), 0); Print ("GV TradedThisBar_ - False - TRADE ALL LineCrosed");
GlobalVariableSet ("SignalsOnly_" + Symbol(), 0); Print ("GV SignalyOnly_ - False - TRADE ALL LineCrosed");
GlobalVariableSet ("BuyOnly_" + Symbol(), 0); Print ("GV BuyOnly_ - False - TRADE ALL LineCrosed");
GlobalVariableSet ("SellOnly_" + Symbol(), 0); Print ("GV SellOnly_ - False - TRADE ALL LineCrosed");
}
It is supposed to trade immediately after line is crossed, but it seem that it waits for next Candle (Bar). Not shure. Sometimes it works, next not.
EA also had MaxTrades function, but, hey, Me, Myself and I were not able to make it work properly (... they can't say we never tried). So we deleted it. It worked on Tester, not on Demo. After position was open SignalsOnly was set to True???
EA is basically simple - Go with the flow (Cut the Loosers, Let the Winners run (and pile)).
From the Code is obvious that I am no Programmer, just WannaBeCoder. Code is taken from here and there (thank you 7bit, RR, TrendChaser, all others).
And of course thank you to anybody willing to help me with this.
Have fun,
Simon
I am kindly asking somebody knowleadgeable enough to help me debug this EA of mine.
The function TradeOncePerBar (GV TradedThisBar_) is not working properly - when EA is attached to Chart (ex. at recompiling) it will open new position, if signaled, on same Bar.
Would be also very handy if EA had 'button' for CLEAR CHART, that would delete Arrows and their connection lines (Chart -> Object List -> Name -> #) from opened and closed trades.
Also not shure if this piece of Code would work:
if (crossedLine ("trade all"))
{
GlobalVariableSet ("TradedThisBar_" + Symbol(), 0); Print ("GV TradedThisBar_ - False - TRADE ALL LineCrosed");
GlobalVariableSet ("SignalsOnly_" + Symbol(), 0); Print ("GV SignalyOnly_ - False - TRADE ALL LineCrosed");
GlobalVariableSet ("BuyOnly_" + Symbol(), 0); Print ("GV BuyOnly_ - False - TRADE ALL LineCrosed");
GlobalVariableSet ("SellOnly_" + Symbol(), 0); Print ("GV SellOnly_ - False - TRADE ALL LineCrosed");
}
It is supposed to trade immediately after line is crossed, but it seem that it waits for next Candle (Bar). Not shure. Sometimes it works, next not.
EA also had MaxTrades function, but, hey, Me, Myself and I were not able to make it work properly (... they can't say we never tried). So we deleted it. It worked on Tester, not on Demo. After position was open SignalsOnly was set to True???
EA is basically simple - Go with the flow (Cut the Loosers, Let the Winners run (and pile)).
From the Code is obvious that I am no Programmer, just WannaBeCoder. Code is taken from here and there (thank you 7bit, RR, TrendChaser, all others).
And of course thank you to anybody willing to help me with this.
Have fun,
Simon
Attached File(s)
offline_charts.mqh
15 KB
|
253 downloads
SevenChi EA v1.1.mq4
36 KB
|
273 downloads
|
Uploaded Dec 2, 2010 1:22pm
CommonFunctionsChi.mqh
57 KB
|
241 downloads
|
Uploaded Dec 2, 2010 1:22pm