Gambler's Pips EA需要调试
1 頁面的第 563 頁 123 上一個上一個
Results 1 to 10 of 30

Thread: Gambler's Pips EA需要调试

  1. #1
    1附件我曾经是一个赌徒,我使用了一个步骤进行投注轮盘赌(它赚了很多钱,直到由于资金不足或赌桌限制不可避免的死亡螺旋),我想我终于弄明白了将其成功应用于外汇交易。根据想法,EA是基于最后一根蜡烛进行买入和卖出基本随机,红色蜡烛卖出蓝色它买,然后它使用慢步进展/回归MM策略使其盈利。我不是程序员,但我理解足以修改现有的程序,我使用了一个粗略的EA生成器然后拼接了几个贸易限制器和我修改过的鞅代码,它有点起作用。唯一的问题是步骤进展/回归加倍,一个交易使用进展,下一个交易使用第二个进展,它交替每隔一个交易(EA测试人员甚至交易使用一个进展,奇数使用第二个进展),都按照他们应该的方式工作。我希望所有交易都能在一个单一的过程中发挥作用。它可能是一个真正的程序员的简单修复。这是EA,我添加了注释,解释每行应该做什么,任何帮助将不胜感激,谢谢。让我们解决这个问题并做一些严肃的事情。

    以下是它的工作原理,它可以根据您的需要从多个批次开始交易,然后在亏损的情况下增加手数并通过赢取减少相同数量的手数。因此,如果您从1手开始并增加/减少1手这个系列的进展(L,L,W,L,L,W,W,L,W,L,W,W)这些交易的批次将是像这样:(1,2,3,2,3,4,3,2,3,2,3,2,1)


    https://www.forex-pedia.com/attachme...4502671011.mq4

  2. #2
    任何类型的鞅将导致追加保证金......不久或以后。

  3. #3
    不是这个,我测试了它,它从1/2010到10/2014幸存下来并且它不是每天的鞅,我只是使用鞅代码作为模板来结合我的步进,它不会死亡螺旋,检查出来。这是带注释的代码:
    Quote Originally Posted by ;
    int Maxorders = 1;/限制一次打开的订单数量,不确定它是否正常工作extern int MagicNumber = 12345; extern double StopLoss = 50; extern double TakeProfit = 50; int TrailingStop = 0; int Slippage = 1; extern bool martingale = true; extern double multiplier = .02;/批量增加/减少因子extern double lotdigits = 2;/批量大小允许的小数位数extern double Lots = .02; double mlots,ilots,lastprofit,lastlot; int BarsCount = 0;/用于限制每条线的一次交易int i,history; int ThisBarTrade = 0;/ ----------------------------------------------- ------------------- /专家启动功能// ---------------------- -------------------------------------------- int start(){ if(Bars gt; BarsCount)history = OrdersHistoryTotal(); if(historygt; 0){for(i = 0; ilt; history; i ){OrderSelect(i,SELECT_BY_POS,MODE_HISTORY); if(OrderSymbol()== Symbol()OrderMagicNumber()== MagicNumber){lastprofit = OrderProfit(); lastlot = OrderLots(); mlots = 0; if(martingale lastprofitlt; 0)mlots = NormalizeDouble(lastlot multiplier,lotdigits);/很多增加公式if(martingale lastprofitgt; 0)mlots = NormalizeDouble(lastlot-multiplier,lotdigits);/很多减少公式if(mlotslt; = Lots)mlots = Lots;/检查批次是否减少到开始批次以下MyPoint = Point; if(Digits == 3 || Digits == 5)MyPoint = Point * 10; double TheStopLoss = 0; double TheTakeProfit = 0; if(TotalOrdersCount()== 0){int result = 0; if((Close [1] gt; Open [1]))//这是你的公开买入规则{if(martingale)ilots = mlots; else ilots = Lots; result = OrderSend(符号(),OP_BUY,ilots,Ask,Slippage,0,0,EA Generator www.ForexEAdvisor.com,MagicNumber,0,Blue); if(resultgt; 0){TheStopLoss = 0; TheTakeProfit = 0; if(TakeProfitgt; 0)TheTakeProfit = Ask TakeProfit * MyPoint; if(StopLossgt; 0)TheStopLoss = Ask-StopLoss * MyPoint; OrderSelect(结果,SELECT_BY_TICKET); OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,位),NormalizeDouble(TheTakeProfit,位),0,绿); } return(0); } if((Close [1] lt; Open [1]))//这是你的开放卖出规则{if(martingale)ilots = mlots; else ilots = Lots; result = OrderSend(符号(),OP_SELL,ilots,Bid,Slippage,0,0,EA Generator www.ForexEAdvisor.com,MagicNumber,0,Red); if(resultgt; 0){TheStopLoss = 0; TheTakeProfit = 0; if(TakeProfitgt; 0)TheTakeProfit = Bid-TakeProfit * MyPoint; if(StopLossgt; 0)TheStopLoss = Bid StopLoss * MyPoint; OrderSelect(结果,SELECT_BY_TICKET); OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,位),NormalizeDouble(TheTakeProfit,位),0,绿); } return(0); for(int cnt = 0; cntlt; OrdersTotal(); cnt ){OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES); if(OrderType()lt; = OP_SELL OrderSymbol()== Symbol()OrderMagicNumber()== MagicNumber){if(OrderType()== OP_BUY){if(TrailingStopgt; 0){if(Bid-OrderOpenPrice()gt ; MyPoint * TrailingStop){if(OrderStopLoss()lt; Bid-MyPoint * TrailingStop){OrderModify(OrderTicket(),OrderOpenPrice(),Bid-TrailingStop * MyPoint,OrderTakeProfit(),0,Green);返回(0); }}} else {if(TrailingStopgt; 0){if((OrderOpenPrice() - Ask)gt;(MyPoint * TrailingStop)){if((OrderStopLoss()gt;(Ask MyPoint * TrailingStop))||(OrderStopLoss()== 0)){OrderModify(OrderTicket(),OrderOpenPrice(),Ask MyPoint * TrailingStop,OrderTakeProfit(),0 ,红);返回(0); } return}返回(0); } int TotalOrdersCount(){int result = 0; for(int i = 0; ilt; OrdersTotal(); i ){OrderSelect(i,SELECT_BY_POS,MODE_TRADES); if(OrderMagicNumber()== MagicNumber)result ; } BarsCount = Bars;返回(结果); }
    Quote Originally Posted by ;
    int Maxorders = 1;/限制一次打开的订单数量,不确定它是否正常工作extern int MagicNumber = 12345; extern double StopLoss = 50; extern double TakeProfit = 50; int TrailingStop = 0; int Slippage = 1; extern bool martingale = true; extern double multiplier = .02;/批量增加/减少因子extern double lotdigits = 2;/批量大小允许的小数位数extern double Lots = .02; double mlots,ilots,lastprofit,lastlot; int BarsCount = 0;/用于限制每条线的一次交易int i,history; int ThisBarTrade = 0;/ ----------------------------------------------- ------------------- /专家启动功能// ---------------------- -------------------------------------------- int start(){ if(Bars gt; BarsCount)history = OrdersHistoryTotal(); if(historygt; 0){for(i = 0; ilt; history; i ){OrderSelect(i,SELECT_BY_POS,MODE_HISTORY); if(OrderSymbol()== Symbol()OrderMagicNumber()== MagicNumber){lastprofit = OrderProfit(); lastlot = OrderLots(); mlots = 0; if(martingale lastprofitlt; 0)mlots = NormalizeDouble(lastlot multiplier,lotdigits);/很多增加公式if(martingale lastprofitgt; 0)mlots = NormalizeDouble(lastlot-multiplier,lotdigits);/很多减少公式if(mlotslt; = Lots)mlots = Lots;/检查批次是否减少到开始批次以下MyPoint = Point; if(Digits == 3 || Digits == 5)MyPoint = Point * 10; double TheStopLoss = 0; double TheTakeProfit = 0; if(TotalOrdersCount()== 0){int result = 0; if((Close [1] gt; Open [1]))//这是你的公开买入规则{if(martingale)ilots = mlots; else ilots = Lots; result = OrderSend(符号(),OP_BUY,ilots,Ask,Slippage,0,0,EA Generator www.ForexEAdvisor.com,MagicNumber,0,Blue); if(resultgt; 0){TheStopLoss = 0; TheTakeProfit = 0; if(TakeProfitgt; 0)TheTakeProfit = Ask TakeProfit * MyPoint; if(StopLossgt; 0)TheStopLoss = Ask-StopLoss * MyPoint; OrderSelect(结果,SELECT_BY_TICKET); OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,位),NormalizeDouble(TheTakeProfit,位),0,绿); } return(0); } if((Close [1] lt; Open [1]))//这是你的开放卖出规则{if(martingale)ilots = mlots; else ilots = Lots; result = OrderSend(符号(),OP_SELL,ilots,Bid,Slippage,0,0,EA Generator www.ForexEAdvisor.com,MagicNumber,0,Red); if(resultgt; 0){TheStopLoss = 0; TheTakeProfit = 0; if(TakeProfitgt; 0)TheTakeProfit = Bid-TakeProfit * MyPoint; if(StopLossgt; 0)TheStopLoss = Bid StopLoss * MyPoint; OrderSelect(结果,SELECT_BY_TICKET); OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,位),NormalizeDouble(TheTakeProfit,位),0,绿); } return(0); for(int cnt = 0; cntlt; OrdersTotal(); cnt ){OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES); if(OrderType()lt; = OP_SELL OrderSymbol()== Symbol()OrderMagicNumber()== MagicNumber){if(OrderType()== OP_BUY){if(TrailingStopgt; 0){if(Bid-OrderOpenPrice()gt ; MyPoint * TrailingStop){if(OrderStopLoss()lt; Bid-MyPoint * TrailingStop){OrderModify(OrderTicket(),OrderOpenPrice(),Bid-TrailingStop * MyPoint,OrderTakeProfit(),0,Green);返回(0); }}} else {if(TrailingStopgt; 0){if((OrderOpenPrice() - Ask)gt;(MyPoint * TrailingStop)){if((OrderStopLoss()gt;(Ask MyPoint * TrailingStop))||(OrderStopLoss()== 0)){OrderModify(OrderTicket(),OrderOpenPrice(),Ask MyPoint * TrailingStop,OrderTakeProfit(),0 ,红);返回(0); } return}返回(0); } int TotalOrdersCount(){int result = 0; for(int i = 0; ilt; OrdersTotal(); i ){OrderSelect(i,SELECT_BY_POS,MODE_TRADES); if(OrderMagicNumber()== MagicNumber)result ; } BarsCount = Bars;返回(结果); }

  4. #4

    Quote Originally Posted by ;
    我曾经是一个赌徒,我使用了一个步骤进行投注轮盘赌(它赚了很多钱,直到不可避免的死亡螺旋由于资金或赌桌投注限制不足),我想我终于想出如何成功应用它外汇。根据想法,EA是基于最后一根蜡烛进行买入和卖出基本随机,红色蜡烛卖出蓝色它买,然后它使用慢步进展/回归MM策略使其盈利。我不是程序员,但我理解足以修改现有程序,我用过......
    我已经有了一个更加强大和有效的MM系统,可以在EA中构建(基本上和你说的一样,在使用更积极的批量之后,在获胜后使用不那么激进的)。这只是方程式的一半,另一半是找到一个系统,以某种方式至少有50%的赢家(让我们说1:1 rr)。现在它看起来很容易达到50%的标记,只是随机买入或卖出,tp和sl相同的尺寸,结果将是50%对吗?错了,你仍然有5-10-20连续的损失会破坏你的帐户。不容易!

  5. #5

    Quote Originally Posted by ;
    不是这个,我测试了它,它从1/2010到10/2014幸存下来并且它不是每天的鞅,我只是使用鞅代码作为模板来结合我的步进,它不会死亡螺旋,检查出来。这是带注释的代码:{quote}
    无论鞅类型如何,你最终都会感到非常失望。你自2009年以来就在这里......你应该读过像你这样的数百个主题(甚至是同一个鞅类型)......没有一个是您想要的圣杯。

  6. #6

    Quote Originally Posted by ;
    {quote}我已经有了一个更强大,更有效的MM系统,可以在EA中构建(基本上和你说的一样,在使用更积极的批量之后,在赢了之后使用不那么激进的) 。这只是方程式的一半,另一半是找到一个系统,以某种方式至少有50%的赢家(让我们说1:1 rr)。现在它看起来很容易达到50%的标记,只是随机买入或卖出,tp和sl相同的尺寸,结果将是50%对吗?错了,你仍然可以连续5-10-20输...
    由于某种原因,这个EA的回测非常慢,并且它的工作方式不是很好,但是看看结果我确信它可以处理与市场投入时一样多的损失,如果它正常工作,那么进展缓慢有两个原因,最大限度地减少成功所需的资金,防止死亡螺旋上升。我希望它能够赚到一致的钱而不是快钱,而且步数和起始价都可以调整。我试图让它尽可能简单。

  7. #7

    Quote Originally Posted by ;
    {quote}无论鞅类型如何,你最终都会感到非常失望。你自2009年以来就在这里......你应该读过像你这样的数百个主题(甚至是同一个鞅类型)......没有一个是您想要的圣杯。
    我知道这是一个很长的镜头,但我认为它会起作用,你是一个程序员,让它正常工作,这样我们就可以做一个准确的回测,并停止争论理论,这就是我想要的。

  8. #8

    Quote Originally Posted by ;
    ...并停止争论理论,这就是我想要的。
    鞅失败远非理论......请不要误会我的意思......我绝对没有反对你。我在这里只是为了警告你,特别是所有新手都准备好这个帖子。

  9. #9

    Quote Originally Posted by ;
    {quote}鞅失败远非理论......请不要误会我的意思......我绝对没有反对你。我在这里只是为了警告你,特别是所有新手都准备好这个帖子。
    我知道Martingale会永远失败,但这并不是真正的鞅,相信我一旦得到结果我会成为第一个发布任何问题的人,但除非EA正常运作,否则我不能这样做。每个人都知道EA交易存在风险,特别是对于像我这样的系统,但是尝试的危害是什么,没有任何冒险可以获得。我从有缺陷的回测中复制了结果,我手动纠正了批量大小,我将会看到它可以做什么,但这需要一段时间,我只有400交易ATM,但这是一个开始,直到有人帮助我让EA正常工作

  10. #10

    Quote Originally Posted by ;
    以下是它的工作原理,它可以根据您的需要从多个批次开始交易,然后在亏损的情况下增加手数并通过赢取减少相同数量的手数。因此,如果您从1手开始并增加/减少1手这个系列的进展(L,L,W,L,L,W,W,L,W,L,W,W)这些交易的批次将是像这样:(1,2,3,2,3,4,3,2,3,2,3,2,1){file}
    如果你想获利,你需要在赢球时下注更多,在输球时下注更少,否则......追加保证金!

發布權限

  • 您不可發布新主題
  • 您不可回复
  • 您不可發布附件
  • 您不可編輯您的帖子
  •  
  • BB代碼是打開的
  • 表情符號是打開的
  • [IMG]代碼是打開的
  • [視頻]代碼是打開的
  • HTML代碼是關閉的
forex-pedia網站使用cookie 文字跟蹤
forex-pedia.com網站使用cookie 文字跟蹤,某些設定已經固定。您可以點擊此處閱讀我們的Cookie使用說明。 請點擊右鍵接受我們的cookies。如果您選擇繼續使用forex-pedia.com網站,我們將認為您接受我們的cookies。