Announcement

Collapse
No announcement yet.

Paper Trade Efs On Close

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Paper Trade Efs On Close

    This is truly amazing software!

    Just two questions about EFS PAPER TRADE. I certainly may be missing a concept or two but I can't figure these questions out:

    COMPUTE ON CLOSE ?
    1. Can I make EFS PAPER TRADE calls with the "setComputeOnClose();" enabled. In other words the, the calls work great when calculating on each tick but I'd like to be able to check only once on each bar so that I don't have to use the "getHolding" all the time etc. Is this possible?

    NEGATIVE NUMBERS FOR SELL ?
    2. To Sell I've got to pass a "negative" value to the "nLotSize" parameter for the Sell method. For example the call below seems to work fine to sell. Is this correct or do I need to toggle another setting etc? If not that's fine since this seems to work for now.

    trade.Sell(getSymbol(),-1,PaperTradeBroker.MARKET,close())

    Thanks so much for your help and great work on the product.

    flip-flop

  • #2
    Some help...

    Just started really messing with the PAPER TRADER module in EFS. But having fun with it..

    Here are some answers for you.

    I use the following function to test for a completion of a bar (or a new bar). The issue with this type of checking is that if you are trying to get your code to run "after the bar completes" then you have to adjust your conditional settings to "-1" - as another newer bar is now forming on the chart.

    If you are trying to test your conditions at the beginning of a NEW BAR, then you would set your conditionals to "0" or () and test the new bar that is forming.

    here is the code


    PHP Code:
    var ntempbartime 0;

    if (
    ntempbartime != getValue("rawtime",0)) {
      
    ntempbartime getValue("rawtime",0);

      
    //Test for previous BLACK (down) bar...
      
    if (close(-1) < open(-1)) {
        do 
    something
      
    }

      
    //Test for OPENING price GAP between current (new bar and previous bar)...
      
    if (open() > close(-1)) {  // Opening Price Gap Up
        
    do something
      
    } else if (open() < close(-1)) {  // Opening Price Gap Down
        
    do something
      
    }


    This basic structure will save you tons of time and frustration.

    Regarding the negative numbers. I have not tried to issue Paper Trades using my EFS yet - so I can't answer.

    Hope this helps.
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      Brad ,

      Pardon my ignorance but what is the PAPER TRADER EFS module ?

      Is it your new DO based broker buttons ?

      Thanks Bill

      Comment


      • #4
        Brad,

        Thanks so much, your approach was a very elegant fix for my problem!!!

        One more question ..... which you may or may not know at this current time since you have not looked at sending trades:

        1. Do you know if there is any way to "canel" orders in paper trade through EFS. For full automation with the paper trade efs, currently I can use only MARKET orders, not STOP or LIMIT because I can't clear the "the side that did not get hit" through efs.

        Certainly these MARKET orders are fine for now.

        Thanks again for the fix below!

        flip-flop

        Comment

        Working...
        X