Hi,velicox wrote:where i can download the last version?
the latest one you will always find at page 1 of this thread, please read carefully the userguide, and the entire thread..
Cheers
Tommaso
Hi,velicox wrote:where i can download the last version?
Yes agreed - however I do think an appropriate lookback is somewhere between 5-15, and some backtesting would gve me more confidence in that. Too small = more entries and more losses, to big = less entries and less profit.BTW don't assume optimizing this would accomplish any magic. This indicator is basically tuning to the "frequency" of the market. The faster the pair cycles up/down/up/down, the shorter your lookback and EMA should be. But the market frequency changes all the time. You might find a lookback that works better in most conditions than 10, but no lookback is always right.
Hi Wapen, I think you need this function:-Wapen wrote:Hi, I just like watching BASA trade. Even the trades that close negative. This system on 4H will let you learn to be pasiant and trade when the market is ready.
Steve, Regarding the H1, can you please show me where in the code is the closes function of a trade after 2 candle in the other direction. (I want to test something related to this). Thank
Thanks Shelly for this excellent trading system and Steve for coding!!
Wapen
Code: Select all
//~ Closure suggestion by spotdespot:
//~ I believe you should save significant pips if you introduce a rule whereby the trade should close if (for a sell) the H4 entry candle closes higher than the entry (open) price AND the following candle also closes higher than its open price (and vice-verse for buys).
//Applies only when there are no stack trades.
if (OpenTrades == 1)
{
if (!OrderSelect(TicketNo, SELECT_BY_TICKET, MODE_TRADES) ) return;//In case the trade has closed
int shift;//For the iBarShift to get the candle shift of the trading candle
static datetime OldTime = 0;//Only need the test at the start of each candle
if (OldTime != Time[0])
{
bool CloseThisTrade = false;
OldTime = Time[0];
if (OrderProfit() < 0)
{
shift = iBarShift(NULL,Period(),OrderOpenTime(), false);
if (shift == 2)
{
if (OrderType() == OP_BUY)
{
if (iClose(NULL, SpotdespotCandleCloseTf, shift) < iOpen(NULL, SpotdespotCandleCloseTf, shift))
{
if (iClose(NULL, SpotdespotCandleCloseTf, shift - 1) < iOpen(NULL, SpotdespotCandleCloseTf, shift - 1))
{
CloseThisTrade = true;
}//if (iClose(NULL, SpotdespotCandleCloseTf, shift - 1) < iOpen(
}//if (Close[shift] < Open[shift])
}//if (OrderType() == OP_BUY)
if (OrderType() == OP_SELL)
{
if (iClose(NULL, SpotdespotCandleCloseTf, shift) > iOpen(NULL, SpotdespotCandleCloseTf, shift))
{
if (iClose(NULL, SpotdespotCandleCloseTf, shift - 1) > iOpen(NULL, SpotdespotCandleCloseTf, shift - 1))
{
CloseThisTrade = true;
}//if (iClose(NULL, SpotdespotCandleCloseTf, shift - 1) < iOpen(
}//if (Close[shift] < Open[shift])
}//if (OrderType() == OP_SELL)
}//if (shift == 2)
}//if (OrderProfit() < 0)
}//if (OldTime != Time[0])
if (CloseThisTrade)
{
result = CloseTrade(TicketNo);
//Actions when trade close succeeds
if (result)
{
DeletePendingPriceLines();
TicketNo = -1;//TicketNo is the most recently trade opened
OpenTrades--;//Rather than OpenTrades = 0 to cater for multi-trade EA's
}//if (result)
//Actions when trade close fails
if (!result)
{
OldTime = 0;//Force a retry at the next tick
}//if (!result)
}//if (CloseThisTrade)
return;//No need for the stack basket code
}//if (OpenTrades == 1)SWG is correct and you will find the snippet within void CountOpenTrades()Wapen wrote:Hi, I just like watching BASA trade. Even the trades that close negative. This system on 4H will let you learn to be pasiant and trade when the market is ready.
Steve, Regarding the H1, can you please show me where in the code is the closes function of a trade after 2 candle in the other direction. (I want to test something related to this). Thank
Thanks Shelly for this excellent trading system and Steve for coding!!
Wapen
Wapen wrote:Hi, I just like watching BASA trade. Even the trades that close negative. This system on 4H will let you learn to be pasiant and trade when the market is ready.
Steve, Regarding the H1, can you please show me where in the code is the closes function of a trade after 2 candle in the other direction. (I want to test something related to this). Thank
Thanks Shelly for this excellent trading system and Steve for coding!!
Wapen
I occasionally give thought to banning the posting of setfiles. Over the coming break, I will give it some serious thought.TonkaTuff wrote:Wapen wrote:Hi, I just like watching BASA trade. Even the trades that close negative. This system on 4H will let you learn to be pasiant and trade when the market is ready.
Steve, Regarding the H1, can you please show me where in the code is the closes function of a trade after 2 candle in the other direction. (I want to test something related to this). Thank
Thanks Shelly for this excellent trading system and Steve for coding!!
Wapen
Hi Wapen,
Could you possibly post your .set file and pairs you are trading please? Are you using BASA to close your basket, or another method?
Thanks,
TT
TonkaTuff wrote:Wapen wrote:Hi, I just like watching BASA trade. Even the trades that close negative. This system on 4H will let you learn to be pasiant and trade when the market is ready.
Steve, Regarding the H1, can you please show me where in the code is the closes function of a trade after 2 candle in the other direction. (I want to test something related to this). Thank
Thanks Shelly for this excellent trading system and Steve for coding!!
Wapen
Hi Wapen,
Could you possibly post your .set file and pairs you are trading please? Are you using BASA to close your basket, or another method?
Thanks,
TT