Losser memory.

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #124539 quote
    Fran55
    Participant
    Veteran

    Example:

    Losser operation dax un 9125.

    I need, the system dont operate before in range 9100-9150 automatically.

    #124540 quote
    Fran55
    Participant
    Veteran

    No before… Next.

    #124541 quote
    Fran55
    Participant
    Veteran

    Memory automatically.

    #124546 quote
    GraHal
    Participant
    Master

    Below will NOT open trades between 09:10 and 09:15.

    Not Tested

    ctime = Time > 091000 and Time < 091500
    
    If BuyCondition and NOT cTime Then
    Buy at Market
    Endif
    #124548 quote
    Francesco
    Participant
    Veteran

    Otherwise if i well understood that he doesn’t need to operate before 9.10 and after 9.15.. not so clear english

    defparam flatbefore= 091000
    defparam flatafter= 091500
    GraHal thanked this post
    #124549 quote
    Fran55
    Participant
    Veteran

    Please, price range… No time.

     

    And system learn automatically… No write bad operation in Code.

    #124561 quote
    GraHal
    Participant
    Master

    @Fran55 it be easier if you use the google translator as we find it difficult to understand what you want help with?

    ¿será más fácil si utiliza el traductor de Google, ya que nos resulta difícil entender con qué quiere ayuda?

    https://translate.google.com/

    Francesco and Serce thanked this post
    #124562 quote
    Nicolas
    Keymaster
    Master

    Yes please Fran55, try to use translator and then copy paste the translated text here,  that would help us a lot!

    #124566 quote
    Fran55
    Participant
    Veteran

    Okay.

    The robot has opened position at dax at 9150, and the position has been losing.

    I want it to no longer open position between 9125 and 9175 from now on.

    But without touching the code again … you have to program in advance that when you lose in a position, you will not enter the market in that price range again.

    Thank you.

    #124576 quote
    GraHal
    Participant
    Master

    I can’t see where this is going as to avoid a Price level that loses is not logical as next time the same Price level could be the entry to the biggest winning trade for days??

    But to move this on … is below what you need?

    Not Tested

    If onmarket and Positionperf < 0 Then
    LossTrade = TradePrice
    Endif
    
    If CondBuy and NOT LossTrade Then //CondSellShort
    Buy at Market // SellShort
    Endif
    
    #124579 quote
    robertogozzi
    Moderator
    Master

    With v11 you could use arrays to store all price levels where a loss has been suffered, but whenever the TS is stopped, all those data are lost!

    It’s not a price level that will make you win or lose, it’s the logic on which the TS is built and…. the fact that losses are an essential part of trading!

    It’s like happiness and sadness, no one can be without the other.

    Try to make happiness prevail, though! 🙂

    GraHal, keewee and Francesco thanked this post
    #124602 quote
    Fran55
    Participant
    Veteran

    No me vale.

    #124603 quote
    GraHal
    Participant
    Master

    No me vale.

    ?? … above doesn’t make sense again??

    Serce thanked this post
    #124643 quote
    Fran55
    Participant
    Veteran

    Grahal.

     

    Range of price, please.

     

    Up and down 0.5% of price entry in the loss position.

    #124644 quote
    Vonasi
    Moderator
    Master

    Something like this should store the last three losing exit prices and not open a new trade if price is +/-0.5% of them. Not tested.

    if strategyprofit < strategyprofit[1] then
    price3 = price2
    price2 = price1
    price1 = tradeprice
    endif
    
    tradeon = 1
    if close < price1*1.005 and close > price1*0.995 or close < price2*1.005 and close > price2*0.995 or close < price3*1.005 and close > price3*0.995 then
    tradeon = 0
    endif
    
    if (your entry conditions) and tradeon then
    buy 1 contract at market
    endif
    GraHal thanked this post
Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.

Losser memory.


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Fran55 @fran55 Participant
Summary

This topic contains 15 replies,
has 6 voices, and was last updated by Fran55
5 years, 10 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 04/03/2020
Status: Active
Attachments: No files
Logo Logo
Loading...