TradeIsEntry

Posted By: Miska

TradeIsEntry - 07/28/23 09:23

Hello

I have started to code and trade with Zorro. Im just beginner and have only some codeing experience 13 years ago. Anyway, I have some problems with TradeIsEntry: PriseIsEntry dont regognice when the entry has done.

First solution, both are in run-function ():

//Entry, first

if((priceH(5)<priceH(4))....{
Entry=priceH(3);
Trade_price=priceH(3);
Counter1+=1;
}

// Examining if the first trade has been entered

if((TradeIsEntry) and (Counter1==1)){
Counter1+=1;
Trade_price=priceReal();

}

Second approch:

//Entry, first, in run function

if((priceH(5)<priceH(4))....{
enterLong(1,priceH(3),sl_10,0,0);
Trade_price=priceH(3);
Counter1+=1;
printf("Counter_BuyStop: %f\n",Counter1);
}

//Examine if trade is entried

int manage(){
if(TradeIsEntry) Counter1+=1;
return 0;
}

function run()
...

So how I can make the TradeIsEntry to work so I can determinate that stop limit has reached and trade is entried?

Thanks for your help

Miska
Posted By: AndrewAMD

Re: TradeIsEntry - 07/28/23 17:11

It is hard to interpret your code snippets out of context. Post the full code.
Posted By: Miska

Re: TradeIsEntry - 07/30/23 14:06

Ok, understand... its little a bit diffucult to put all to the code...

Is it possbile to give some short code example how the TradeIsEntry work? How I can detect that Entry=priceH(3) has been generated to actual trade? Or is the TradeIsEntry only possbile way or easiest?

Thanks
Posted By: Miska

Re: TradeIsEntry - 08/02/23 09:38

Can anybody give a example...
Posted By: AndrewAMD

Re: TradeIsEntry - 08/02/23 13:41

Did you even set up your TMF correctly? Are you pointing to it when you call enterLong/enterShort? If not, your code will not work.

These booleans will be set up whenever the TMF is called. Check them all and print stuff to the log to verify behavior:
TradeIsNewBar
TradeIsEntry
TradeIsStop
TradeIsProfit

At the bottom are some code samples showing a proper TMF setup:
https://zorro-project.com/manual/en/trade.htm
Posted By: Miska

Re: TradeIsEntry - 08/03/23 09:28

Ok, so when Im using TradeIsEntry all these trades or entries( stops) have to set up via tmf process. So I have to make these trades/entries before run-function in different TMF-prosedure(as it is in manual)? And after that I can check if TradeIsEntry. Ok, I ll try this. Thanks Andrew!
Posted By: Miska

Re: TradeIsEntry - 08/10/23 10:32

Thanks for help...algo is now working...
© 2024 lite-C Forums