stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Help ! Differentiate trades entered in different TF's
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4719
Page 1 of 1
Author:  RisklessPips [ Thu May 19, 2016 1:10 pm ]
Post subject:  Help ! Differentiate trades entered in different TF's

Hi

I trade many pairs over many time frames.

I also trade without SL and TP which means I have to manually keep track of trades - not a problem so far so good.

However, when I go to my chart say for cable I often see many trades on the chart and I forget what time frame I added the different trades in :shock:

Because I use a TS strategy that is TF dependant these multi TF trades make it difficult to add my trailing stops when the trades go into profit.

Is there any one who can develop a script or EA to add the TF a trade was added to the Buy / Sell Comment that appears with each trade ? (So if Buy Stop triggers it becomes Buy TF - where TF is the TF in which it was added etc etc.)
Author:  renexxxx [ Fri May 20, 2016 1:11 am ]
Post subject:  Help ! Differentiate trades entered in different TF's

The order comment field is set when the trade is sent to your br0ker. If you trade manually, you can enter that comment on the Order entry screen, and if you use a script or EA to send these trades to the br0ker, you can specify the comment as one of the parameters of the OrderSend() function. Once the trade has been placed, you can not modify the order comment field.
Author:  RisklessPips [ Fri May 20, 2016 8:30 am ]
Post subject:  Help ! Differentiate trades entered in different TF's

renexxxx » Fri May 20, 2016 3:11 am wrote:The order comment field is set when the trade is sent to your br0ker. If you trade manually, you can enter that comment on the Order entry screen, and if you use a script or EA to send these trades to the br0ker, you can specify the comment as one of the parameters of the OrderSend() function. Once the trade has been placed, you can not modify the order comment field.
Sorry - I did not make myself clear.

Once the trade is made on the chart I see on the left on the green entry price line Buy stop / Buy limt etc for pending trades. Open trades show Buy or sell + amount of lot size.

It is these comments I would like to have amended so that they say for example Buy 0.02 TF H1

That way looking at again for example a pair on which I have traded D1, H4 and H1 - I can see at a glance which price line relates to which TF.

Hope thats clearer.
Author:  RisklessPips [ Wed May 25, 2016 8:09 am ]
Post subject:  Help ! Differentiate trades entered in different TF's

I've been tracking things down and I think the function below is what needs changing to do what I require.
which is to add TF to the trade levels


How do I add this - TF code
===========================>

Code: Select all

ENUM_TIMEFRAMES  ChartPeriod(
   long  chart_id=0      // Chart ID
   );
<==========================

To this show trade levels function ?

==========================>

Code: Select all

CHART_SHOW_TRADE_LEVELS — property of displaying trade levels on the chart (levels of open orders, Stop Loss, Take Profit and pending orders).

//+---------------------------------------------------------------------+
//| The function defines if trading levels are displayed on the chart.  |
//+---------------------------------------------------------------------+
bool ChartShowTradeLevelsGet(bool &result,const long chart_ID=0)
  {
//--- prepare the variable to get the property value
   long value;
//--- reset the error value
   ResetLastError();
//--- receive the property value
   if(!ChartGetInteger(chart_ID,CHART_SHOW_TRADE_LEVELS,0,value))
     {
      //--- display the error message in Experts journal
      Print(__FUNCTION__+", Error Code = ",GetLastError());
      return(false);
     }
//--- store the value of the chart property in memory
   result=value;
//--- successful execution
   return(true);
  }
//+------------------------------------------------------------------+
//| The function enables/disables trading levels display mode.       |
//+------------------------------------------------------------------+
bool ChartShowTradeLevelsSet(const bool value,const long chart_ID=0)
  {
//--- reset the error value
   ResetLastError();
//--- set property value
   if(!ChartSetInteger(chart_ID,CHART_SHOW_TRADE_LEVELS,0,value))
     {
      //--- display the error message in Experts journal
      Print(__FUNCTION__+", Error Code = ",GetLastError());
      return(false);
     }
//--- successful execution
   return(true);
  }

Author:  dokopy [ Wed May 25, 2016 8:49 am ]
Post subject:  Help ! Differentiate trades entered in different TF's

RisklessPips » Thu May 19, 2016 1:10 pm wrote:Hi

I trade many pairs over many time frames.

I also trade without SL and TP which means I have to manually keep track of trades - not a problem so far so good.

However, when I go to my chart say for cable I often see many trades on the chart and I forget what time frame I added the different trades in :shock:

Because I use a TS strategy that is TF dependant these multi TF trades make it difficult to add my trailing stops when the trades go into profit.

Is there any one who can develop a script or EA to add the TF a trade was added to the Buy / Sell Comment that appears with each trade ? (So if Buy Stop triggers it becomes Buy TF - where TF is the TF in which it was added etc etc.)
You can use the resolution by lot size. For example 0,11 lot = H1, 0,12 lot = H4 ...
All times are UTC Page 1 of 1