Sari la conținut
  • intrări
    18
  • comentarii
    51
  • citiri
    3.433.803

Paper Trading (part 2)


tradelover

1.721 citiri

Arrrr...

 

A'vast me hearties, me fellow pip-pillagers. Me be a little bit upset there was no feedback about paper pillaging. Anyhow, time kept me quite busy fighting the paper in real time. Me be a big bug finding! (this is a trial to combine the pirateglish with starwars's Yoda's style, well... you can guess what in the seven seas I wanna say, even i found a bug, or even I am the bug, I dont care...)

 

Trading the Strategy Tester on paper is quite nice! It works fine and doesn't need any upgrades. But moving to real time trading shows few bugs of the Paper Trader. First of all, in ST you can't change the TF. That is because ST is selfish and it takes care of TF by itself. Well, for last month, me be not death, but sailing a real time account. Of course a demo one. So, I set sail, chart the course, put the Paper Trader on the helm. Then me be saying "let's speed up!", and here we go changing the TF. Then whoaaa!! all the compass got drunk and the small triangles disappeared from the map. Grrrr...

 

That is why me decided to land ho! Return to port and change the toys, sharpen the blades.

 

New version, much clever be. First of all, the captain not only can remove the StopLoss or TakeProfit lines from the chart, but he can also ADD targets and stops, just dragging the "TP" or "SL" texts over the order line (green dotted line where the order was open). The kind of order automatically detected will be, and few trendlines can be drawn to make clear what SL/TP for what order stand.

 

Meantime, if ye are lazy captain ye can set yer crew to put the chip log on the water and drag it behind the ship. That is, to move yer stop order behind yer profit, like a pure trailing stop, or more complex strategies.

 

Read the comments inside of the box to see more. Here is the box.

 

Paper_Trader_v1.5.zip

 

Few other comments:

 

As a general rule, a SL is never moved backward. We say that the stop "is holding". Stops should come from some risk calculus, i.e. from some money management rules, and never be moved against us. Relaxing the stops is a wrong practice done often by beginner traders. They "feel" that the price will reverse in their favor when it comes closer to the SL's, so they move the SL few pips against them, to avoid it to be hit. The result is always just few pips more lost, as the new "relaxed" stop - anyhow - is hit. So, holding the stops is implemented in PT. If you use any moving method, for example "=SMA", then the stops will "hold" even if the SMA pulls back a little, sometimes.

 

Contrary, targets will not hold. It is normal to move the target in both directions, if you consider that an order has more or less potential, according with the price action. That is why you should be careful when you select a moving method for your targets. SMA and EMA targets with big offset in your direction can be very profitable stuff, as they will close your orders which have no potential anymore. But beware: they will move your target in both directions. As "=TSL" makes no sense for targets, new methods were implemented, one is "=MIN()", that you will find it pretty nice, and also we have Bollinger bands and Envelope channels.

 

Enjoy.

 

Later edit: I did a last minute change. Initial implementation was "remembering" the methods when you change the TF. The strings were saved in global variables, and re-opened in the init() function, each time when you click on other TF's, acording with the order number. But trading for a while in real time, I got very strange results, because most of the methods, as MA's, SAR, etc, are timeframe dependent!!! So, if you have a SL moving on EMA(10) on a D1 chart and you click on M5, you could have the BAD surprise that your SL is moved 4 pips behind the price (because EMA is more closer to the price for M5 chart!), and then hit in few seconds. That is why I decided to delete all global variables and let the methods get lost when you change the TF. So, be carefull, if you have many orders with description of triangles edited already (you inputed already moving methods for them) then they all will be LOST when you change the TF, and you have to input them again from your keyboard. This is not a bug. It was designed like that. To work around, never change the TF of a chart were you have clapped moving methods. If you do so, then you have to clap-clap-clap them again. I.e. you have to click on all arrows and input "=TSL(....blablabla)". If you need to see other TF, then open new chart with the same pair and play with TF. But don't change the TF if you have already descriptions for moving methods. On the other side, changing the TF is a fast way to erase all the methods. If you have many methods and they begin to show strange behavior, and you want to get rid of them, just change the TF, and change it back. All triangles will be re-painted, fresh, no methods.

 

Next version could include some methods like "=EMA(20)/M30", to make the SL independent of the TF. That is, the MA would be calculated on M30, does not matter which chart you are looking at. In this case you could change the TF and still remember the moving method without affecting its functionality. But for now, the command interpreter is much simpler, that is why such implementation is not yet done. Sorry for that.

1 Comentariu


Comentarii Recomandate

**** advertizing for brokers, posted many times, edited by tradelover, rest of the comments deleted (all the same text)

Link spre comentariu
Vizitator
Adaugă un comentariu...

×   Alipit ca text avansat.   Alipește ca text simplu

  Doar 75 emoji sunt permise.

×   Linkul tău a fost încorporat automat.   Afișează ca link în schimb

×   Conținutul tău precedent a fost resetat.   Curăță editor

×   Nu poți lipi imagini direct. Încarcă sau inserează imagini din URL.

×
×
  • Creează nouă...

Informații Importante

Am plasat cookie-uri pe dispozitivul tău pentru a îmbunătății navigarea pe acest site. Poți modifica setările cookie, altfel considerăm că ești de acord să continui.