Strategy remembering individual trades
Posted: Dec 17 2011
Hello
Some background :
I wish to automatically trade SLV-ETF @ARCA , Long only , NO SL => NO Lever (1:1) and using a MC - Strategy running on a Server and controlling TWS/IB .
The strategy will StopBuy some ETF when certain price is achieved . As soon, as this trade is profitable I wish to protect this cash with SL and place next trade ...such increasing my position .
Let us assume now, that after (i.e.) the 1st purchase (BUY SLV) price drops again and floating loss is recognised . Strategy will stand-by until charting identifies , that new trade would be meaningfull . Once this happens , I than wish the strategy to place the next order , same approach => StopBuy of some ETF .
Lets assume, the purchase takes place , I would have double shares , 50% bought at Price A and 50% at B . I now wish to handle these two "trades" (virtually // RMMM) as seperate , manage their SL,TP, trailings and so forth as individual . Maybe sell B at profit whilst A keeps on "waiting" with floating loss . Comment : I am aware , that this is virtual .
Here the issue now : Some trades can last for weeks and months . How do I remember the keydata of each individual trade , so that the Strategy can run full RM/MM at all times ?
I will have to store the data one/one, for example in an array which continuously I could update .
I am new to MC and my experience has grown in MT4 . Which code allows me to save/load individual data , for example stored in an array or other variables , on my PC so that I can reload when needed (boot of PC after weekend or other) ?
Thanks
Lobo
Some background :
I wish to automatically trade SLV-ETF @ARCA , Long only , NO SL => NO Lever (1:1) and using a MC - Strategy running on a Server and controlling TWS/IB .
The strategy will StopBuy some ETF when certain price is achieved . As soon, as this trade is profitable I wish to protect this cash with SL and place next trade ...such increasing my position .
Let us assume now, that after (i.e.) the 1st purchase (BUY SLV) price drops again and floating loss is recognised . Strategy will stand-by until charting identifies , that new trade would be meaningfull . Once this happens , I than wish the strategy to place the next order , same approach => StopBuy of some ETF .
Lets assume, the purchase takes place , I would have double shares , 50% bought at Price A and 50% at B . I now wish to handle these two "trades" (virtually // RMMM) as seperate , manage their SL,TP, trailings and so forth as individual . Maybe sell B at profit whilst A keeps on "waiting" with floating loss . Comment : I am aware , that this is virtual .
Here the issue now : Some trades can last for weeks and months . How do I remember the keydata of each individual trade , so that the Strategy can run full RM/MM at all times ?
I will have to store the data one/one, for example in an array which continuously I could update .
I am new to MC and my experience has grown in MT4 . Which code allows me to save/load individual data , for example stored in an array or other variables , on my PC so that I can reload when needed (boot of PC after weekend or other) ?
Thanks
Lobo