Not logged in
Viewing 6 posts - 1 through 6 (of 6 total)
  • #260190 |
    Customer
    788 Posts

    i want to make an EA, which will set the SL and TP only when i open my manual trade

    i will manually open my trade (without SL and TP) and i want to set by EA immediately the SL to the lowest(5) /for BUY and highest(5) for sell/ and TP as 1:1

    is it possible by AW?

    You want to be a profitable algotrader? We started using StrateQuant software in early 2016. For now we have a very big knowhow for building EAs for every possible types of markets. We share this knowhow, apps, tools and also all final strategies with real traders. If you want to join us, fill in the FORM. 1500+ final SQX strategies for members running on demo accounts to verify the edge DEMO ACCS. We provide also strategies for indices - DAX, DOW JONES, NASDAQ, SP, UK, because we have realtick data from our brokers.

    #260207
    tomas262
    Administrator
    1821 Posts

    Hi,

    you should be able to do that using built-in function “Set stop loss” and “Set profit target”. The magic number parameter needs to be set to 0.

    Let me know if any issues with that

    Attachments:
    You must be logged in to view attached files.
    #260216
    Customer
    788 Posts

    i tried it, but get an error while i want to save MQL4 code

    An error occured while generating the strategy XML source code.
    Exc. When calling macro “printBlock”, required parameter “block” (parameter #1) was specified, but had null/missing value.

    —-
    Tip: If the parameter value expression on the caller side is known to be legally null/missing, you may want to specify a default value for it with the “!” operator, like paramValue!defaultValue.
    —-

    —-
    FTL stack trace (“~” means nesting-related):
    – Failed at: #macro printBlock block shift=”0″  [in template “MetaTrader4/mt4Blocks.inc” in macro “printBlock” at line 208, column 1]
    – Reached through: @printBlock signal?children[0]  [in template “MetaTrader4/mt4Blocks.inc” in macro “printRule” at line 139, column 46]
    ~ Reached through: #nested  [in template “MetaTrader4/Functions.inc” in macro “replaceBr” at line 4, column 18]
    ~ Reached through: @replaceBr  [in template “MetaTrader4/mt4Blocks.inc” in macro “printRule” at line 74, column 1]
    – Reached through: @printRule rule  [in template “MetaTrader4/mt4Blocks.inc” in macro “printRulesForEvent” at line 63, column 1]
    – Reached through: @printRulesForEvent “OnBarUpdate”  [in template “MetaTrader4\\Main.tpl” at line 143, column 1]

    Attachments:
    You must be logged in to view attached files.

    You want to be a profitable algotrader? We started using StrateQuant software in early 2016. For now we have a very big knowhow for building EAs for every possible types of markets. We share this knowhow, apps, tools and also all final strategies with real traders. If you want to join us, fill in the FORM. 1500+ final SQX strategies for members running on demo accounts to verify the edge DEMO ACCS. We provide also strategies for indices - DAX, DOW JONES, NASDAQ, SP, UK, because we have realtick data from our brokers.

    #260217
    Customer
    788 Posts

    the logic should be simple – if any open trades occurs and it has no SL, set SL

    You want to be a profitable algotrader? We started using StrateQuant software in early 2016. For now we have a very big knowhow for building EAs for every possible types of markets. We share this knowhow, apps, tools and also all final strategies with real traders. If you want to join us, fill in the FORM. 1500+ final SQX strategies for members running on demo accounts to verify the edge DEMO ACCS. We provide also strategies for indices - DAX, DOW JONES, NASDAQ, SP, UK, because we have realtick data from our brokers.

    #260222
    tomas262
    Administrator
    1821 Posts

    No need to use the standard template. You can simply setup 2 tabs like in the example attached.

    Use ‘MagicNumber’ variable as the magic parameter. it is set to 0

    Now it returns the source properly

    Note: I see no error in your setup so I reported your version to developers to check why it had the issue with the source code

    Attachments:
    You must be logged in to view attached files.
    #261884
    Conmariin
    Customer
    116 Posts

    I know a bit late, but perhaps my free “Foxy S and R” is the halfautomatic EA you can work with?

    https://www.rabenesche.de/home/expert-advisor-und-indikatoren/foxy-s-and-r

    Automatisches Handeln mit Expert Advisor
    https://www.rabenesche.de

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.