Help ! Differentiate trades entered in different TF's

Place your new trading idea here to see if someone can automate it.
Post Reply
User avatar
RisklessPips
Trader
Posts: 246
Joined: Mon May 09, 2016 2:24 pm
Location: Nairobi, Kenya

Help ! Differentiate trades entered in different TF's

Post by RisklessPips »

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.)
Trading is a mind game - good job I have a brain
User avatar
renexxxx
Trader
Posts: 860
Joined: Sat Dec 31, 2011 3:48 am

Help ! Differentiate trades entered in different TF's

Post by renexxxx »

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.
User avatar
RisklessPips
Trader
Posts: 246
Joined: Mon May 09, 2016 2:24 pm
Location: Nairobi, Kenya

Help ! Differentiate trades entered in different TF's

Post by RisklessPips »

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.
Trading is a mind game - good job I have a brain
User avatar
RisklessPips
Trader
Posts: 246
Joined: Mon May 09, 2016 2:24 pm
Location: Nairobi, Kenya

Help ! Differentiate trades entered in different TF's

Post by RisklessPips »

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);
  }

Trading is a mind game - good job I have a brain
dokopy
Trader
Posts: 35
Joined: Thu Mar 19, 2015 7:22 am

Help ! Differentiate trades entered in different TF's

Post by dokopy »

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 ...
Post Reply

Return to “Ideas for Possible Automation”